How to disable CAN bus RX mailbox interrupts?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
jofic_334026
Level 3
Level 3
First like received

I'm using a CY8C4247 with a CAN bus.  I have several mailboxes set up.  Some are standard identifiers. Some are extended identifiers.  Depending on a value read from EEPROM I'd like to enable only one mailbox at a time.  I'm assuming I could just turn off the IRQ for all the unnecessary mailboxes.  I've tried using the CAN_RX_INT_DISABLE macro but it didn't work.  Any help will be greatly appreciated!

0 Likes
1 Solution
ShanmathiN_06
Employee
Employee
100 replies posted 50 replies posted 25 replies posted

Hi,

Could you please provide your code snippet on how you are using the CAN_RX_INT_DISABLE macro? Double-check if you are utilizing the correct mailbox number.

Or else, you could manually write to the CAN0_CAN_RX_CONTROL register (RX_INT_EBL bit). Please refer to register TRM for more details on the register.

I hope this helps.

Thanks,

Shanmathi

View solution in original post

0 Likes
3 Replies
ShanmathiN_06
Employee
Employee
100 replies posted 50 replies posted 25 replies posted

Hi,

Could you please provide your code snippet on how you are using the CAN_RX_INT_DISABLE macro? Double-check if you are utilizing the correct mailbox number.

Or else, you could manually write to the CAN0_CAN_RX_CONTROL register (RX_INT_EBL bit). Please refer to register TRM for more details on the register.

I hope this helps.

Thanks,

Shanmathi

0 Likes

I have the TRM for the 4200 Family but I can't find anything on CAN0_CAN_RX_CONTROL register or RX_INT_EBL bit.  Could you please direct me towards the correct document?

Here is a screenshot of how I've configures the receive mailboxes:

CAN2 RX Config.png 

       

Here's a code snippet:

CAN2_Start();

// This is how I am trying to disable the mailbox IRQ.

CAN2_SET_RX_WNPL(CAN2_RX_MAILBOX__FROM_F150); // Disable write protect

CAN2_RX_INT_DISABLE(CAN2_RX_MAILBOX__FROM_F150); // Disable the interrupt (NOT WORKING!!!)

CAN2_CLEAR_RX_WNPL(CAN2_RX_MAILBOX__FROM_F150); // Enable write protect

// This is how I am trying to enable the mailbox IRQ.

CAN2_SET_RX_WNPL(CAN2_RX_MAILBOX__FROM_F150); // Disable write protect

CAN2_RX_INT_ENABLE(CAN2_RX_MAILBOX__FROM_F150); // Enable the interrupt (NOT WORKING!!!)

CAN2_CLEAR_RX_WNPL(CAN2_RX_MAILBOX__FROM_F150); // Enable write protect

0 Likes

Hi, Please refer to https://www.cypress.com/file/175726/download (PSoC 4200 M Register TRM: pg 151)

Thanks,

Shanmathi

0 Likes