Can interrupt in dsPIC

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: Can interrupt in dsPIC

Post by r_romeo »

Hi Mika and Ben
I am using a dsPIC30f4012 and I have the LEDs in PORTB_L (0-4)
I get this behaviour just when I use the interruption , if I read the IDs in normal reception (using a while until "check buffer" get something) I am able to read the IDs

in the TX I am setting an IDlow=96 , tha is = 3

in the RX I set buffer 0 to receive a 3 and buffer 0 in the reception to generate the interruption. interruption is done, then I measure the Data received in buffer 0 and I get the one I sent (22), so far so good.
I set the RX module to show the IDhi received in buffer 0 in the LEDs and nothing is there (good), if I set the LEDs to output the IDlow received in buffer 0, also none of the LEDs are on (should be 3)

I did the same procedure for buffer 1 in the reception and same result

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: Can interrupt in dsPIC

Post by r_romeo »

any news??

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Can interrupt in dsPIC

Post by Mikat »

No.
My pcb:s will arrive probably next week, then I can test the can with 30f devices...

Mika

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Can interrupt in dsPIC

Post by Mikat »

Hi.

Are you sure that you program runs fine?
Because if I use that interrupt, my program hangs completely when the interrupt are called first time....
Does the mask and filters work with you?
I can set both buffers to reject all messages, and still the messages goes at the buffer, like the filters and masks accepts all messages...
And the filter hit bits are always 2, even the message "hits" different filters..
Ben, Steve or anybody who knows how to control those masks and filters in f30 series, I have been looking at datasheet but I can't find how to control those (at 18f there was RXM0 and RXM1 bits in RXBnCON register).

Mika

Mikat
Posts: 258
Joined: Wed Nov 29, 2006 6:32 pm
Location: Finland
Has thanked: 7 times
Been thanked: 36 times
Contact:

Re: Can interrupt in dsPIC

Post by Mikat »

Ok, little more research about the masks and filters..
For some reason it seems the the CAN component code don't write the mask and filter data, it seems that there is always last via c code written data or default values, if I set the mask and filter manually via code block, those works just fine, and the filter hit bits works too, and if I remove the c code and choose the reject all messages via flowcode CAN component, there is still the masks and filters which are set via c code...
Bug for component?


Mika

r_romeo
Posts: 54
Joined: Wed Nov 02, 2011 3:57 pm
Has thanked: 14 times
Been thanked: 3 times
Contact:

Re: Can interrupt in dsPIC

Post by r_romeo »

I will check over the weekend

Post Reply