Menu

#654 nvicEnableVector broken for Cortex-M0

3.0.3
closed
None
High
3.0.2
True
2015-11-08
2015-10-28
No

nvicEnableVector and nvicDisableVector are broken for Cortex-M0 chips. The NVIC->IP register is byte addressable for Cortex-M3, but only word addressable for Cortex-M0. See section 4.2.6 in the Cortex-M0 Devices Generic User Guide versus section 4.2.7 of the Cortex-M3 Devices Generic User Guide.

nvicSetSystemHandlerPriority is also broken for Cortex-M0. The attached patch only addresses the bug with nvicEnableVector/nvicDisableVector. Feel free to implement this however you'd like.

1 Attachments

Discussion

  • Stephen Caudle

    Stephen Caudle - 2015-10-28

    Sorry, I should have been more specific ... the thing that is broken for Cortex-M0 is the setting of the interrupt priority only. The interrupts are enabled properly, but their corresponding priority bits are not set properly.

     
  • Giovanni Di Sirio

    • assigned_to: Giovanni Di Sirio
    • Severity: Low --> High
    • Fixed in Repository: False --> True
     
  • Giovanni Di Sirio

    Hi,

    Thanks for fining, the code was fine in 2.6.x. I fixed it by using the same CMSIS macros in nvic.c but without using CMSIS functions because handler indexes are unsigned in ChibiOS.

    Please let me know if you see problems in the fix.

    Giovanni

     
  • Giovanni Di Sirio

    • status: open --> closed
     

Log in to post a comment.