There are a lot of issues with the FC9 and the internal CAN component. do not quite know where to start. can you take a look at it. There are a lot of error messages on the CAN bus.
Port B10 does not work when I test with LED
see attachment file
dsPIC33EP256MU806 chip truble
-
- Posts: 35
- http://meble-kuchenne.info.pl
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
-
- Valued Contributor
- Posts: 489
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 262 times
Re: dsPIC33EP256MU806 chip truble
Hi,
What kind of errors?
Do you have anything on the bus receiving?
I cannot recall if the internal CAN auto-resends.
What about adding a CheckRx for both CAN channels in a say x10 loop with 100ms delay, instead of the 1 second delay?
Why are you setting C1CTRL1 and C2CTRL1 to zero?
What kind of errors?
Do you have anything on the bus receiving?
I cannot recall if the internal CAN auto-resends.
What about adding a CheckRx for both CAN channels in a say x10 loop with 100ms delay, instead of the 1 second delay?
Why are you setting C1CTRL1 and C2CTRL1 to zero?
-
- Posts: 35
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
Re: dsPIC33EP256MU806 chip truble
Why are you setting C1CTRL1 and C2CTRL1 to zero?
C1CTRL1 and C2CTRL1 are to make both internal CAN buses work. I got this from Ben for use in fc7 and it has worked
What kind of errors?
just lots of unreadable error that I see in canAnaluser.
Do you have anything on the bus receiving?
No have not tested it yet. we get to fix A before we fix B
What about adding a CheckRx for both CAN channels in a say x10 loop with 100ms delay, instead of the 1 second delay?
It's just for testing
))) 100ms or 1 second does not matter
)) but let's fix send first
)
C1CTRL1 and C2CTRL1 are to make both internal CAN buses work. I got this from Ben for use in fc7 and it has worked

What kind of errors?
just lots of unreadable error that I see in canAnaluser.
Do you have anything on the bus receiving?
No have not tested it yet. we get to fix A before we fix B

What about adding a CheckRx for both CAN channels in a say x10 loop with 100ms delay, instead of the 1 second delay?
It's just for testing



-
- Posts: 35
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
-
- Posts: 35
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
Re: dsPIC33EP256MU806 chip truble
and Port B10 does not work.
maybe there are several proters that do not work that make CAN not work.
If you start by finding the error in the B10 port then you may find something more that could be the cause of several errors
)))
will think it's easiest to start there
maybe there are several proters that do not work that make CAN not work.
If you start by finding the error in the B10 port then you may find something more that could be the cause of several errors

will think it's easiest to start there

-
- Valued Contributor
- Posts: 489
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 262 times
Re: dsPIC33EP256MU806 chip truble
Have you tested B10 output with a meter or oscilloscope?
I notice you have a blue LED connected, that could be the issue?
How accurate is the 500K baud?
The 8MHz clock might not be high enough to give an accurate enough baud rate.
What exact error messages is the CAN analyser giving you?
This might help.
I notice you have a blue LED connected, that could be the issue?
How accurate is the 500K baud?
The 8MHz clock might not be high enough to give an accurate enough baud rate.
What exact error messages is the CAN analyser giving you?
This might help.
-
- Posts: 35
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
Re: dsPIC33EP256MU806 chip truble
I can make the same program for ECIO40P16 and then upload this file to this chip with MPLAB IPE and then B10 works properly. the problem must be in the FC9 and not on the pcb card.
problems only occur when I select this chip. it works fine when I compile with ECIO but not when I use dsPIC33EP256MU806 chip.
The same applies to CAN. if I compile with ECIO then CAN works. if I compile it with dsPIC33EP256MU806 chip then it does not work.
on the drawing I have blue LED but I really use a yellow LED
problems only occur when I select this chip. it works fine when I compile with ECIO but not when I use dsPIC33EP256MU806 chip.
The same applies to CAN. if I compile with ECIO then CAN works. if I compile it with dsPIC33EP256MU806 chip then it does not work.
on the drawing I have blue LED but I really use a yellow LED

-
- Valued Contributor
- Posts: 489
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 83 times
- Been thanked: 262 times
Re: dsPIC33EP256MU806 chip truble
I think the issue is that the ECIO config settings are pre-configured, such as use of PLL.
On your dsPIC33EP256MU806 project it looks like you are running on the FRC, which will likely not be accurate enough for CAN.
On your dsPIC33EP256MU806 project it looks like you are running on the FRC, which will likely not be accurate enough for CAN.
-
- Posts: 35
- Joined: Wed Dec 02, 2020 11:41 am
- Been thanked: 2 times
Re: dsPIC33EP256MU806 chip truble
I have updated my dsPIC33EP256MU806 project to the same bootlods and PLL that I got from Ben. my project now works fine with ECIO chip compilering but still not with dsPIC33EP256MU806 chip compilation
I think port B10 should work anyway so something is wrong.
I think port B10 should work anyway so something is wrong.