This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

S2E SysCtlSleep

In S2E data from/to ethernet is directly write to/from UART buffer. I have to modify the transmission by adding additional buffers between eth and uart buffers. Exchange of data between the buffers I want to put in the main function. Main function is run every SYSTICK due to SysCtlSleep() at the beginning this function. Does Ethernet or UART interrupt also  switch processor to run mode like SysTick interrupt?

Maybe there is any other better place in the code where I could put the exchange of data between buffers? lwIPHostTimerHandler()?



  • MrBool,

    By default, no, these peripherals will not switch the processor to run mode in the event of an interrupt. You will need to enable and configure it to operate even if the CPU is in sleep. To do so, you need to set clock gating and then sleep enable every desired peripheral after it's been enabled. For ex:

    SysCtlPeripheralClockGating(true);

    SysCtlPeripheralEnable(...UART);

    SysCtlPeripheralSleepEnable(...UART);

    As a good reference, check out the udma_demo.c within StellarisWare/boards/ek-lm4f232/udma_demo. This example takes advantage of UDMA, UART, and SysTick while in sleep mode.