How to activate Register Bank Save function in C code ISR for RXv3
How to activate Register Bank Save function in C code ISR for RXv3
Hello support,
We are currently using MCU RX231 in our product with Renesas 8.3.0.202411-GNURX Toolchain.
There are plans to upgrade the hardware to a new MCU with RXv3 core (for example RX671).
I have studied the new RXv3 feature “Register Bank Save function”.
But I don’t understand how to make use of this in an C-interrupt function.
Currently we typically use the following syntax/style:
void Ricc0ReceiveInterrupt(void) __attribute__((interrupt(“.rvectors”, VECT(RIIC0, RXI0))));
void Ricc0ReceiveInterrupt(void) {
…
}
This generates assembler code that push/pops register to the stack and the necessary RTE instruction.
I found an application note from Renesas regarding using the Register Bank save Function.
But this document only describes how to write code in C using the CC-RX compiler.
Here it seems to be a special pragma where you can specify the bank to use:
#pragma interrupt handler(vect=64, bank=3)
void handler(void) {
…
}
Any help or information on this topic would be appreciated.
Best regards,
Håkan
Hello,
Thank you for reaching out to us!
To make use of the register bank save function, developers can use the interrupt_bank attribute:
void bank_int() __attribute__ ((interrupt_bank(3), interrupt(RXD1_VECT, RXD2_VECT, “.rvectors”)));
Please let us know if we can be of assistance with any other issues.
Best regards,
The Open Source Tools Team