Hi Ma
Many thanks - I have been using the external clock source and not the bus clock source, which means that I HAVE TO enable it.
The confusion seems to come from the fact that the original code comes from the Coldfire FlexCAN project where the clock source could be selected but didn't have to be enabled too. This means that I now understand the original errata as "the external source has to be enabled in order to configure the CAN controller irrespective of whether the external or bus clock will be used".
If I were to use the bus clock I think that I would have had the problem that you describe since I was setting the source after moving to the freeze mode - I now also changed the code ordering so that the clock settings are written before moving to freeze mode in order to avoid this problem if I were to select the bus clock source in the furure.
The original simplified pseudo code was:
#IF ERRATE NEEDED // compile time decision
enable external clock source
#ENDIF
move to freeze mode
configure the clock (speed and select clock source)
It is now:
IF EXTERNAL CLOCK SOURCE TO BE USED // run time decision
enabled external clock source
ELSE
do nothing
ENDIF
configure the clock (speed and select clock source)
move to freeze mode
Regards
Mark