Dear all
I need to enable interrupt nesting on an RX microcontroller. In older versions of the development environment and compiler, this was enabled for each interrupt by specifying the enable parameter in the callback prototype within the vect.h file. For example:
The problem is that in the latest versions, the interrupt list file is automatically generated by the SmartConfigurator tool, and I don't see any available options to enable nesting.
Additionally, there is no longer a single file containing the interrupt list, which forces us to search for them throughout the entire project and modify one by one every file that contains an interrupt callback function. Moreover, if we modify the generated interrupt list file to add this option, the modification is removed every time the configuration is generated again with SmartConfigurator.
I have seen in some webpages that it is possible to enable interrupt nesting through compiler configuration options, but I can't find this setting.
Can anyone tell me how interrupt nesting option can be set up from IDE or SmartConfigurator?
I look forward to your response.
From the Smart-Config tool, look for a checkboxe to "Enable Multiple Interrupts", for example for the SCI in UART mode:
Reference the user guide:
Dear JimB
Thanks for your reply. I have checked this Enable multiple interrupt option from Smartconfigurator and I have realized that the way how the enabling testing it is a bit different from another Rx families: it puts a SETPSW_I instruction instead of setting enable parameter in pragma interrupt,
The problem are:
Please, could you tell me if there is a similar option for Rx671 and for all available components for this uC?
Thanks for your support.
Best regards
Most of the interrupt functions have call-back functions where you could add the interrupt enabling at the beginning if there was any processing left to do in that function. The call-back functions have a provision to not overwrite the user code:
/* Start user code for r_Config_SCI0_callback_transmitend. Do not edit comment generated here */ /* End user code. Do not edit comment generated here */
Unfortunately I don't know of any other work around to add such capability to the tool, I don't know why that feature would be left off some peripherals. I created a new RX671 project under CS+ and I see the options available for at least some peripherals (e.g. CMT, SCI).
I would guess that the reason the feature is not used with the CC-RL pragma is b/c the SC tool also supports other compilers (GCC, IAR) which may not have such a pragma, and for commonality between all compilers the source now adds the SETPSW_I() statement.
Dear Jim
Thanks again for your response.
In my opinion, the fact that some controllers that allow nesting or not depends on whether it has been considered in the implementation of the component; maybe it will be included in next versions of Smartconfigurator. It seems, there is no sense about what components and what microcontrollers allow this feature in Smartconfigurator.
For example, only CMI0 and CMI1 allow nesting in this list of Rx72N interrupts:
So, I think it is necessary to add manually SETPSW_I() instruction to each interrupt routine as you say in order to ensure nesting.
I hope that no higher priority interrupt happens before the excution of SETPSW_I(). If this happens, the higher interrupt won't be processed if it uses edge detection, will it?
Best regards.