I have been going nuts trying to figure out where the compiler is finding reg_ptr -> CCM.RCR.
The CCM.RCR is the reset control register and I use it to reboot the MCF52259chip.
I found this code somewhere, probably on this blog where it refers to CCM.RCR.
It works OK so I gave it no further thought.
When I display the pointer in the debug display it is missing.
Is this because it is protected in some way?
I currently am having troubles with ESD induced trama and my software based watchdog is not helping.
So I am now attempting to find a way to implement the backup watchdog timer.
To do this I have to find the Backup Watchdog Timer Control Register.
Where is it in the MCF5225.H file?
There is a structure for it here.
** Watchdog timer
typedef struct mcf5225_watchdog_struct
uint_16 WCR; // Watchdog control register
uint_16 WMR; // Watchdog modulus register
uint_16 WCNTR; // Watchdog count register
uint_16 WSR; // Watchdog service register
} MCF5225_WATCHDOG_STRUCT, _PTR_ MCF5225_WATCHDOG_STRUCT_PTR;
typedef volatile struct mcf5225_watchdog_struct _PTR_ VMCF5225_WATCHDOG_STRUCT_PTR;
How do I asign a pointer to this?
Has anyone out the implimented a Backup Watchdog out there?