Hello Team,
I have difficulties with the CAN component on PIC18F2585,
as you will see from the prints I put a led loop with 10mSec delays in the IF loop were I check when a message is received ,when I send a message from my PCAN dongle
the buffer return that it has a message and the led blink for 10 mSec as intended ( the message arrives 50 msec ) when I place the same loop in a case selection with the ID as selector after I use the getRxIDsimple or RxID( both standard and Extended has the same effect) the Led will not blink as it seems the getRxID macro/component does not return or return incorrect ID, ( I apologize for this crude debugging method however as FC at the moment has the Debug disabled I can not use my Flowkit V2 to see what happens) ,The RX buffer properties are set at Accept all .
Would it be possible to have a look at this I know the hardware is working as I did a test SW in MPLABX which function correctly
In FC I tested the Tx function and that is working it seems only the RX has a problem
Thank you very much
Error Reading CAN ID with getRxID
Moderator: Benj
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Error Reading CAN ID with getRxID
- Attachments
-
- 4.JPG (23.52 KiB) Viewed 12434 times
-
- 3.JPG (23.48 KiB) Viewed 12434 times
-
- 2.JPG (31.43 KiB) Viewed 12434 times
-
- 1.JPG (27.76 KiB) Viewed 12434 times
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Error Reading CAN ID with getRxID
Hi QMESAR,
I tend to use GetRxIdent, as that returns the message ID without all the bit shifting associated with the CAN controller registers.
So for a standard ID, that would be a number < 2048
Or is that what you have tried?
Leigh
I tend to use GetRxIdent, as that returns the message ID without all the bit shifting associated with the CAN controller registers.
So for a standard ID, that would be a number < 2048
Or is that what you have tried?
Leigh
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Error Reading CAN ID with getRxID
Hi LeighM
I have tried both and not sure they are working correctly in V6 they work as I has used them in V6 however in V7 I cant get them to return me the ID
Thanks for the reply
I have tried both and not sure they are working correctly in V6 they work as I has used them in V6 however in V7 I cant get them to return me the ID
Thanks for the reply
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Error Reading CAN ID with getRxID
LeighM
That would be very kind of you
Thanks a million
That would be very kind of you
Thanks a million
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Error Reading CAN ID with getRxID
just to let you know that I've reviewed the code and cannot see any problem,
but I'm just waiting for some devices to arrive, then I'll investigate further on hardware
but I'm just waiting for some devices to arrive, then I'll investigate further on hardware
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Error Reading CAN ID with getRxID
Hi LeighM
Thank you that is no problem do it as you have time I tried again and not sure what is happening
It looks to me it is something with the Extended ID format
Thank you that is no problem do it as you have time I tried again and not sure what is happening
It looks to me it is something with the Extended ID format
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Error Reading CAN ID with getRxID
Hi QMESAR
Yes, you are correct about it being connected with Extended ID format.
I've just run some tests between two sets of hardware running Flowcode CAN component, EB006 with PIC18F4585 and a MIAC.
Turns out that there is a bug in the bit shifting in GetRxIdent, so affects some CAN message IDs.
Fixed PIC_CAL_CAN.c file attached.
Thanks!
Leigh
Yes, you are correct about it being connected with Extended ID format.
I've just run some tests between two sets of hardware running Flowcode CAN component, EB006 with PIC18F4585 and a MIAC.
Turns out that there is a bug in the bit shifting in GetRxIdent, so affects some CAN message IDs.
Fixed PIC_CAL_CAN.c file attached.
Thanks!
Leigh
- Attachments
-
- PIC_CAL_CAN.c
- (26.03 KiB) Downloaded 383 times
- QMESAR
- Valued Contributor
- Posts: 1287
- Joined: Sun Oct 05, 2014 3:20 pm
- Location: Russia
- Has thanked: 384 times
- Been thanked: 614 times
Re: Error Reading CAN ID with getRxID
LeighM
Thank you very much for your support really appreciate this
I am on a business trip will test and try the new file on the weekend when I am back at my Lab
Thank you very much for your support really appreciate this
I am on a business trip will test and try the new file on the weekend when I am back at my Lab
https://www.flowcodexchange.com/
Regards QMESAR
Regards QMESAR