1 Reply Latest reply on Apr 10, 2018 11:21 PM by himam_31

    FreeRTOS freertosconfig.h

      The template guy has several fields in his FreeRTOS code that are #def'ed as "[dependent of processor]" but nowhere (I can find) does he say what to do for any given processor.  The demo code in the official release of FreeRTOS has the following confidence inspiring comment before it starts defining the constants not included in the Cypress template blog post:


      * Configure the number of priority bits. This is normally

      * __NVIC_PRIO_BITS but PSoC Creator beta 5 contained a larger

      * value for the priority than is implemented in the hardware so

      * set it here to what the data sheet describes.


      I added the underline and italics above to highlight the stuff that make me not very confident that the reasoning behind what was set for FreeRTOS 8 is really right for today.  I can set them as:

      #define configPRIO_BITS       3

      #define configKERNEL_INTERRUPT_PRIORITY ( 7 << (8 - configPRIO_BITS) )

      #define configMAX_SYSCALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )

      #define configMAX_API_CALL_INTERRUPT_PRIORITY ( 5 << (8 - configPRIO_BITS) )

      and everything seems to build, but as I have not worked with FreeRTOS very much in quite a while I'd really like the guidance of someone who knows it better.