This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM: CMSIS-OS RTX if an ISR runs for 1.5ms will it cause problems with the RTOS?

I am porting a bare metal application to the Keil MDK-PRO middleware so that we can use USB HOST.

I have nested interrupt handlers in the code, most take less than 25us to run. I have one interrupt handler though that can run as long as 1.5ms and I am hoping this will not disrupt the RTOS.

This long ISR allows higher priority ISR's to nest within it. I realize that this could cause the SYSTICK 1ms interrupt to "skip" a millisecond and I am hoping this will not cause any problems for the RTOS.

Rewriting this ISR would take a lot of work and I have limited time. Moving the code from the ISR to a RTOS Task would slow the response time down a lot (from ~100us at present to over 1ms).

Anyone have experience with running long ISR's and CMSIS-OS?

Parents
  • Thanks for the reply, I appreciate it. I don't have the option of changing the wire protocol which must be backwards compatible with MODBUS.

    There is lot more detail which I don't want to bore anyone with, as to how and why the existing software is this way. Suffice it to say the UART has a ring buffer and there is a state engine that examines the packets (which runs in the long ISR). Data copying itself is fast and is only used to move data to and from the UART ring buffer to the application space.

    If the software had been designed with an RTOS initially then it would have been designed quite differently. Unfortunately parts of the software go back 15 years and were designed for a much smaller microcontroller using a superloop.

    If I cannot use the existing code with CMSIS-OS RTX because of this long ISR then I face a lot more work. Anyway thanks for taking the time to reply.

Reply
  • Thanks for the reply, I appreciate it. I don't have the option of changing the wire protocol which must be backwards compatible with MODBUS.

    There is lot more detail which I don't want to bore anyone with, as to how and why the existing software is this way. Suffice it to say the UART has a ring buffer and there is a state engine that examines the packets (which runs in the long ISR). Data copying itself is fast and is only used to move data to and from the UART ring buffer to the application space.

    If the software had been designed with an RTOS initially then it would have been designed quite differently. Unfortunately parts of the software go back 15 years and were designed for a much smaller microcontroller using a superloop.

    If I cannot use the existing code with CMSIS-OS RTX because of this long ISR then I face a lot more work. Anyway thanks for taking the time to reply.

Children
No data