Page 1 of 2

dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 1:02 pm
by kennethnilsen69
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
Flowcode1.fcfx
(19.27 KiB) Downloaded 791 times

Re: dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 1:41 pm
by LeighM
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?

Re: dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 2:10 pm
by kennethnilsen69
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 :-))

Re: dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 2:26 pm
by LeighM
Can you check the baud rate?

Re: dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 2:47 pm
by kennethnilsen69
baud rate is 500 as it should be :-)

Re: dsPIC33EP256MU806 chip truble

Posted: Wed Apr 14, 2021 2:51 pm
by kennethnilsen69
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 :-)

Re: dsPIC33EP256MU806 chip truble

Posted: Thu Apr 15, 2021 8:53 am
by LeighM
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.

Re: dsPIC33EP256MU806 chip truble

Posted: Thu Apr 15, 2021 4:22 pm
by kennethnilsen69
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 :-)

Re: dsPIC33EP256MU806 chip truble

Posted: Fri Apr 16, 2021 8:58 am
by LeighM
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.

Re: dsPIC33EP256MU806 chip truble

Posted: Fri Apr 16, 2021 4:05 pm
by kennethnilsen69
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.