MSCAN S08DZ Reciecver Interrupt Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MSCAN S08DZ Reciecver Interrupt Problem

1,055 Views
Swood
Contributor I

Hi All,

 

First off, I'm using CW 5.9.0 with PE 3.07.

 

I've done all the obvious code changes for the CAN, but I cannot get it to generate an interrupt on receiver full. The Rx Acceptance ID masks are set to al FFs, and the Acceptance Mode is set to Two 32bit Filters. I've looked at the clock and bit rate settings and they look right for 500Kbit/s operation, but I cannot get the system to generate an interrupt. The interrupt service just toggles an LED right now. It looks like the CAN_Init function is being called the CANE bit is being set.

 

What else should I be looking at to get this running?

 

Stuart

Labels (1)
Tags (1)
0 Kudos
5 Replies

779 Views
ProcessorExpert
Senior Contributor III

Could you please post a sample zipped project showing the problem or screenshots of all your component settings?

 

best regards
Petr Hradsky
Processor Expert Support and Servicepacks Team

 

0 Kudos

779 Views
Swood
Contributor I

Does this Help?

0 Kudos

779 Views
Swood
Contributor I

Here is an example project. I expect it to toogle a LED everytime a CAN message is sent.

0 Kudos

779 Views
ProcessorExpert
Senior Contributor III

Hi,

 

From a  look on the project, I don't see anything that would be clearly wrong... However, there might be some timing setup or other issue. I recommend to enable the Error interupt and create a simple handler for it and check if any error occurs by putting breakpoint inside.

Do you have a properly configured  board? It might be also useful to check with scope if there is actuall some signal on the selected CAN pins of the MCU.

 

best regards
Petr Hradsky
Processor Expert Support Team

 

779 Views
Swood
Contributor I

I've added the Error Interrupts and it is going into the Error Passive state due to receive errors.

There is data on the bus. I've attached scope captures of the working HC08GZ and the NOT working HCS08DZ. A Grid Connect USB/CAN Adaptor transmits data from a test program.

 

0 Kudos