Missing CCM from debugger display

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Missing CCM from debugger display

504 Views
drummer
Contributor IV

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.

/*
** MCF5225_WATCHDOG_STRUCT
** 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
uchar filler[0xFFF8];
} 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?

Labels (1)
0 Kudos
1 Reply

287 Views
drummer
Contributor IV

So I enabled the Backup Watchdog Timer.

//#define BWDT 0x40140000void A2D_task(uint_32 nothing){ uint_32 i; _mqx_uint result;  MQX_TICK_STRUCT wdticks; MCF5225_WATCHDOG_STRUCT_PTR wdt_ptr; wdt_ptr = (MCF5225_WATCHDOG_STRUCT_PTR)BWDT; wdt_ptr -> WMR = 65535; //timer gets loaded after kicking the watchdog             //should be about 6.7 seconds wdt_ptr -> WSR = 0x5555; // kick wdt_ptr -> WSR = 0xaaaa; // kick wdt_ptr -> WCR = 0x1d;  // RM 8.2.2.1 enable +  STOP WAIT DOZE modes

 and I opened pandoras box.

The BWDT is a write once kind of affair.

Once you start the BWDT you can't turn it off. The only way to stop it is to repower.

I found the MCF5225_WATCHDOG_STRUCT in mcf5225.h but refered to the RM for the address of the register.

So if you have to flash some firmware your going to be in trouble.

Is there a way of setting the processor in a STOP WAIT or DOZE mode prior to flashing ?

How can I turn off that which cannot be turned off?

0 Kudos