SysTick now CRAWLING - K22F

cancel
Showing results for 
Search instead for 
Did you mean: 

SysTick now CRAWLING - K22F

779 Views
tharonhall
Contributor IV

So I have an OSA instance of FreeRTOS ticking off the SysTick at 100 Hz. That normally works just fine, but every now and then the RTOS related process appear to come to a stop. When I capture what is happening, the SysTick appears to be firing once every 2-3 seconds or so, rather than at 100 Hz.

 

I thought it might have something to do with interrupts being disabled or some such, but other interrupts run just fine.

 

I don't even know where to being looking at this. EmbSysReg doesn't include SysTick and the Registers in the debug window don't either.

 

Any suggestions on where to start would be greatly appreciated.

 

Regards,

 

Tharon

Labels (1)
8 Replies

497 Views
tharonhall
Contributor IV

So I am sure there is a good chance it has something to do with threading on our OSA implementation using FreeRTOS. Any thoughts on where to re-post the question or possibly a good place to start? Have discovered that debugging RTOS issues is particularly tricky, as most folks could attest to I am sure.

0 Kudos

497 Views
trytohelp
NXP Employee
NXP Employee

Hi,

May be you can create a new post for this problem.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

497 Views
tharonhall
Contributor IV

Well, still haven't found the source of this particular issue. It does appear that under normal conditions the SysTick works correctly, and was not able to discern any issues specifically with the SysTick when my idle tasks suspended with no known cause. Might be yet another RTOS-related issue that manifests itself in some very nasty ways I am afraid. :smileysad:

0 Kudos

497 Views
tharonhall
Contributor IV

A related question: As a possible workaround, could I manually call FreeRTOS's tick from a working interrupt? Does anyone know how to manipulate the SysTick? I couldn't find anything in PEx, but wasn't 100% sure where to look.

0 Kudos

497 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

You can use the EmbSys Registers window to see the content of all registers. You just must select the target device manually.

Open the EmbSys Registers window and open the Preferences dialog, see below:

pastedImage_0.png

In the dialog select the SVD(CMSIS) architecture, Freescale vendor and the target chip. Click on OK.

All registers will be displayed. You just must select registers which value you want to update (double click on the register). If the content is not updated execute a single instruction by a debugger to refresh the content of the selected registers.

Please note, that you can have a bug in the application (content of registers is overwritten by using uninitialized pointer), heap or stack size issue (memory is overwritten) and so on.

Best Regards,

Marek Neuzil

497 Views
tharonhall
Contributor IV

Thanks, but I fear it is simply missing from my view of my K22F MCU. :smileysad: Perhaps some kind soul knows how to update the definition file to include it?

0 Kudos

497 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

I have checked all MK22F derivatives in EmbSys Registers window (KDS 3.0.0 installation) and all these derivatives contain SysTick registers.

If you are not using KDS 3.0.0 you can try to update EmbSys Registers SVD files, see the detailed description on the webpage Updated Eclipse EmbSysReg Viewer with extra Freescale SVD Files | MCU on Eclipse

Best Regards,

Marek Neuzil

497 Views
tharonhall
Contributor IV

Yeah! There is an even better file for my device now and with the update I can see SysTick. Now the question is whether or not I can fix my issue, though the good news is I am better prepared to debug it. :smileyhappy:

0 Kudos