CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 38 matches
CCS Forum Index
Author Message
  Topic: PIC24 spewing CAN messages even in reset
bryant@balancebitsconsult

Replies: 2
Views: 2805

PostForum: General CCS C Discussion   Posted: Wed Jun 19, 2024 5:01 pm   Subject: PIC24 spewing CAN messages even in reset
Good news I suppose. We're on the same team - it seems there was a random device that was publishing CAN messages on the same lines that the PIC was connected to.

Fun times.

PIC was fine all alo ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Wed May 22, 2024 6:21 pm   Subject: CAN message interrupts stop after first interrupt serviced
hmm, I know, you've already thought of this but.....
... have you confirmed the CAN bus pullups / terminators are the correct values ?
'weird' stuff can happen with CAN.......

Yes, all checked th ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Wed May 22, 2024 12:37 am   Subject: CAN message interrupts stop after first interrupt serviced
Ok, this is fairly hideous, but it does work !!

I have implemented additional errata, including the DMA issue and one built already by CCS in the can-pic24_dsPIC33.c inside of can_getd() , you can ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Tue May 21, 2024 9:18 pm   Subject: CAN message interrupts stop after first interrupt serviced
I am also seeing this in the errata -- I wonder if I am experiencing this too. I see that it is used in can_init().


15. Module: DMA
When the DMA is set up for CAN receive,
interrupts can someti ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Tue May 21, 2024 6:45 pm   Subject: CAN message interrupts stop after first interrupt serviced
Ok, a little closer ... I think these are the registers, but I am never seeing these as > 0.




/*****************************************
The ERRIF status flag (CiINTF[5]) ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Tue May 21, 2024 6:17 pm   Subject: CAN message interrupts stop after first interrupt serviced
here's what I have so far


#include <main_can_sand.h>
#include <stdint.h>

#define CAN_PWR_EN PIN_D9 // Power PIN to turn on CAN to the MCU

/********************************* ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Tue May 21, 2024 5:58 pm   Subject: CAN message interrupts stop after first interrupt serviced
yes, I expect that I am never going to get a CAN_INTERRUPT_ERR.


I am a little stumped on the "right" way to inspect these ERROR flags every time. Is there a "best practices" ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Tue May 21, 2024 3:33 pm   Subject: CAN message interrupts stop after first interrupt serviced
I will try this now. This seems very plausible.
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 4:49 pm   Subject: CAN message interrupts stop after first interrupt serviced
New code, shows that the interrupts I am receiving are CAN_INTERRUPT_INVALID.

Once I receive once of these interrupts, I never receive another CAN interrupt of any other type, as a result I cannot ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 2:02 pm   Subject: CAN message interrupts stop after first interrupt serviced
Notable issue :

Module: CAN

A transmit-interrupt event (even if it is disabled as
an interrupt source) that happens immediately
after the reception-interrupt event will cause the
ICODE bits t ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 1:40 pm   Subject: CAN message interrupts stop after first interrupt serviced
I just noticed there is quite a bit of errata on this chip including CAN & ECAN
on silicon revision B1.... You wouldn't be unlucky enough to be using this one?
One thing it says if you are usi ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 1:26 pm   Subject: CAN message interrupts stop after first interrupt serviced
I just noticed there is quite a bit of errata on this chip including CAN & ECAN
on silicon revision B1.... You wouldn't be unlucky enough to be using this one?
One thing it says if you are usi ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 12:58 pm   Subject: CAN message interrupts stop after first interrupt serviced
Interesting...trying to figure out to test this...

I have a PCAN adaptor connected to the CAN line that is sending a message once a second to this code. The code responds when it works correctly a ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 12:50 pm   Subject: CAN message interrupts stop after first interrupt serviced
Compiler version?

v5.116


ALSO -- and this is weird --

The code will work correctly and ping-pong, as long as there is not a CAN Message on the bus when the board starts.

If there is a m ...
  Topic: CAN message interrupts stop after first interrupt serviced
bryant@balancebitsconsult

Replies: 22
Views: 13868

PostForum: General CCS C Discussion   Posted: Mon May 20, 2024 12:33 pm   Subject: CAN message interrupts stop after first interrupt serviced
Sample code seeing this behavior:

main_can_sand.h

#include <24EP512GU810.h>
#device ICSP=1
#use delay(clock=120MHz,oscillator=4MHz)


#FUSES NOWDT //No Watc ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group