Quantcast
Channel: Tools
Viewing all articles
Browse latest Browse all 91752

Forum Post: RE: Problems trying to debug Tiva TM4C129X Dev board with CCS 5.5

$
0
0

I tried using the file from Chester and I got a new error related to trying to read from the address specified in the OnPreFileLoaded( ) function. I check the Tiva datasheet and the register (SRCR0) specified in the gel  file does not exist in the Tiva device. I found a similar register (SRWD) for the Tiva device, and changed the code within the OnPreFileLoaded( ) function and that seems to work. Here is the updated function:

// Reset the WATCHDOG0 and WATCHDOG1 modules prior to loading a file, so that
// the watchdog doesn't corrupt downloading to flash
#define SYSCTL_SRCR0_R 0x400FE500 //0x400FE040
#define SYSCTL_SRCR0_WDT1 0x00000010 // 0x10000000 // WDT1 Reset Control
#define SYSCTL_SRCR0_WDT0 0x00000001 // 0x00000008 // WDT0 Reset Control

#define WR_MEM_32(addr, data) *(unsigned int*)(addr) = (unsigned int)(data)
#define RD_MEM_32(addr) *(unsigned int*)(addr)
OnPreFileLoaded()
{
  //WR_MEM_32 (SYSCTL_SRCR0_R, RD_MEM_32(SYSCTL_SRCR0_R) | (SYSCTL_SRCR0_WDT1 | SYSCTL_SRCR0_WDT0));
  //WR_MEM_32 (SYSCTL_SRCR0_R, RD_MEM_32(SYSCTL_SRCR0_R) & ~(SYSCTL_SRCR0_WDT1 | SYSCTL_SRCR0_WDT0));
  WR_MEM_32 (SYSCTL_SRCR0_R, (SYSCTL_SRCR0_WDT1 | SYSCTL_SRCR0_WDT0));
}

I changed the define values as needed and now only write to the register as only two bits have any meaning.

To get the TivaWare watchdog example to fail, do this:

  1. Load project into workspace.
  2. Build project
  3. Click Run -> Debug. Program should load and run fine.
  4. Stop debugger.
  5. Click Run -> Debug. Errors should appear and JTAG interface will be broke, requiring unlocking.

Thanks for the help!

Jeff


Viewing all articles
Browse latest Browse all 91752

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>