Hi Dave
As I understand it only the
M52235,
M52255 and
M52259 have the random number generator. This is also shown here (
my overview of things as I understand them)
http://www.utasker.com/forum/index.php?topic=256.msg995#msg995I checked where the use of the RNG was controlled. It is in
m5223x.h#if defined _M52235 || defined _M5225X
#define RND_HW_SUPPORT
#endifIt is enabling when the Kirin3 is selected and so is not correct. It will indeed cause the processor to hang if the SW attempts to use it.
Therefore the best correction (
to automate this) is to change the check in that file to
#if defined _M52235 || defined _M52255 || defined _M52259
#define RND_HW_SUPPORT
#endifNote that the exact chip type is defined in
app_hw_m5223x.h. If either of the Freescale boards is used (
M52259EVB or
M52259DEMO as defined in
config.h) the 144 pin
_M52259 is automatically selected.
When using your own board you can select
_M52258 which should then control the use of the SW based RNG instead.
!!! I tested and found another problem. There is a basic dependency problem in the Coldfire project: the exact type is defined in app_hw_m5223x.h but some decisions based on it in m5223x.h. Since there are some defines from m5223x.h used for calculations in app_hw_m5223x.h the include ordering is first m5223x.h and then app_hw_m5223x.h. The result is that the detailed decisions in m5223x.h don't work correctly since they know nothing about the detailed chip type!!!!The solution to this was to remove the include of
#include "../../Hardware/m5223x/M5223X.h" from
types.h to within
app_hw_m5223x.h. It can be positioned just
after the detailed chip type settings. Then it all really does adjust itself as it should. The RND was in fact not being enabled together with the M52235 since the define
_M52235 was never seen before. This should also be improved...
Thanks for pointing this error out. I have put a link to this thread in the patch list!
http://www.utasker.com/forum/index.php?topic=644.msg2954#msg2954Regards
Mark