dsPIC33EP256MU806 chip truble

Any bugs you encounter with Flowcode should be discussed here.
kennethnilsen69
Posts: 35
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

dsPIC33EP256MU806 chip truble

Post 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

LeighM
Valued Contributor
Posts: 489
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 262 times

Re: dsPIC33EP256MU806 chip truble

Post 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?

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: dsPIC33EP256MU806 chip truble

Post 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 :-))

LeighM
Valued Contributor
Posts: 489
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 262 times

Re: dsPIC33EP256MU806 chip truble

Post by LeighM »

Can you check the baud rate?

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: dsPIC33EP256MU806 chip truble

Post by kennethnilsen69 »

baud rate is 500 as it should be :-)

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: dsPIC33EP256MU806 chip truble

Post 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 :-)

LeighM
Valued Contributor
Posts: 489
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 262 times

Re: dsPIC33EP256MU806 chip truble

Post 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.

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: dsPIC33EP256MU806 chip truble

Post 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 :-)

LeighM
Valued Contributor
Posts: 489
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 83 times
Been thanked: 262 times

Re: dsPIC33EP256MU806 chip truble

Post 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.

kennethnilsen69
Posts: 35
Joined: Wed Dec 02, 2020 11:41 am
Been thanked: 2 times

Re: dsPIC33EP256MU806 chip truble

Post 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.

Post Reply