Tool/software:
Dear support,
Note: The datasheets I'm referring to below are
- TivaWare Peripheral Driver LIbrary User's Guide
- Microcontroller Datasheet - TM4C1294KCPDT
I have integrated the microcontroller into my own hardware.
My issue is that sometimes (it feels at random) the microcontroller won't reboot after the lib function SysCtlReset()
is called. The difficulty with this is that is not easy reproducible.
Since It doesn't happen all the time after the SysCtlReset()
, let say it happens 1 out of 100 times
The only way to get out of this state is to completely power cycle it (or use the reset pin) to make the micro start again
Some extra info about my application
- The application starts at address 0x4000 which is called by a bootloader (at address 0x0000)
- It already happens when I just have 2 tasks running
- It always happens at the same exact part of the code namely directly after the
SysCtlReset()
To find the the situation where it 'crashes' on, I wrote a test program
- Where the OS is not running (doesn't not start the bios, or let any tasks run)
- Only the main() loop is running
- A count down of 10seconds to force the SysCtlReset()
- 1 hw GPIO to control a LED
- 1 hw UART to print out some information
When I loop this program endlessly by starting it somewhere in the evening and the next morning the micro crashed. So it happened somewhere between that time period (in one of those 10second countdowns)
After the 10s countdown runs out and right before the SysCtlReset()
I set 2 things in my program
SysCtlResetBehaviorSet(SYSCTL_ONRST_WDOG0_POR|SYSCTL_ONRST_WDOG1_POR|SYSCTL_ONRST_BOR_POR|SYSCTL_ONRST_EXT_POR);
- Print out some debug info with some SysCtl_ information, this is what is looks like on default:
"
ClockGet: 0x927C00
FlashSectorSizeGet: 0x4000
IntStatus: 0x00
DeepSleepGet: 0x12
LDOSleepGet: 0x18
NMIStatus: 0x0
PWMClockGet: 0x0
BehaviorGet: 0xFFFFFFFF
ResetCauseGet: 0x10
VoltageEventStatus: 0x0
"
I'm stuck at this point, so maybe you can help me further by answering these 2 questions.
1) Whatever I set with SysCtlResetBehaviorSet()
the SysCtlResetBehaviorGet()
will allways return 0xFFFFFFFF, regardless if I do it on startup or right before shutdown , even right before the _Get()
. it still returns 0xFFFFFFFF. Do you have any idea why this is? the peripheral library datasheet insinuates that this is something I can configure without any extra conditions. Is this possibly some kind of project settings I'm doing wrong?
2) The output of my 10s countdown debug info is always the same (see above), however after a crash situation occurs and I reset it manually (power cycle) the output is different
"
ClockGet: 0x20C58C0
FlashSectorSizeGet: 0x4000
IntStatus: 0x00
DeepSleepGet: 0x12
LDOSleepGet: 0x18
NMIStatus: 0x0
PWMClockGet: 0x0
BehaviorGet: 0xFFFFFFFF
ResetCauseGet: 0x2
VoltageEventStatus: 0x100
"
My question is, do you know what the VoltageEventStatus()
with report value 0x100 means? The datasheet only talks about the following possible values
//***************************************************************************** // // Values used with the SysCtlVoltageEventStatus() and // SysCtlVoltageEventClear() APIs. // //***************************************************************************** #define SYSCTL_VESTAT_VDDBOR 0x00000040 #define SYSCTL_VESTAT_VDDABOR 0x00000010