I am trying to port the RT Kernel of CHIBIOS 19.1.2 to the Cypress MB9BF516N (Cortex M3) (see SK-FM3-100PMC-MB9BF516N https://www.cypress.com/documentation/development-kitsboards/fm3-100pmc-mb9bf516n).
This MCU has the following core:
- 32-bit ARM Cortex-M3 Core
- Processor version: r2p1
- Up to 144 MHz Frequency Operation
- Memory Protection Unit (MPU): improves the reliability of an
embedded system
- Integrated Nested Vectored Interrupt Controller (NVIC): 1
NMI (non-maskable interrupt) and 48 peripheral interrupts
and 16 priority levels
- 24-bit System timer (Sys Tick): System timer for OS task
management
Now my question is how to implement Fast Interrupts (without OS Context) and call the task scheduler afterwards to report an Interrupt Event to an appropriate Thread.
Therefore I've the following exception concept in mind:
least priority (OS I-State [Systick, SVC_Handler, PEND_SV])
Fast Priority: Calls PEND_SV Exception to inform Threads by event about interrupt occurance
chcore.h
#define CORTEX_MAXIMUM_PRIORITY 0U
#define PORT_USE_ALT_TIMER FALSE
this definition is set in chcore_v7.mh
#define PORT_SUPPORTS_RT FALSE
#define CORTEX_BASEPRI_DISABLED 0U
#define CORTEX_ENABLE_WFI_IDLE FALSE
#define CORTEX_SIMPLIFIED_PRIORITY FALSE
+ Q: OS I-State functions should run at CORTEX_MINIMUM_PRIORITY priority?
+ Q: It is sufficient to use the Handler SVC_Handler and PendSV_Handler from chchore_v7m.c ?
+ Q: Is there another way meant to do the job better?
regards
Lorenz