  By exploiting the connection between scattered $\mathbb{F}_q$-subspaces of
$\mathbb{F}_{q^m}^3$ and minimal non degenerate $3$-dimensional rank metric
codes of $\mathbb{F}_{q^m}^{n}$, $n \geq m+2$, described in [2], we will
exhibit a new class of codes with parameters $[m+2,3,m-2]_{q^m/q}$ for infinite
values of $q$ and $m \geq 5$ odd. Moreover, by studying the geometric
structures of these scattered subspaces, we determine the rank weight
distribution of the associated codes.
