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 support@ccsinfo.com

Problem with Silicon Errata on PIC24FJ128GA705
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
PICmodule



Joined: 26 Oct 2021
Posts: 32

View user's profile Send private message

PostPosted: Thu Jun 29, 2023 10:45 am     Reply with quote

Hi,
I wrote new I2C handler that is working with all (bad and good) hardware
Will release to publicity tomorrow. It is universal for any 24 version
Ttelmah



Joined: 11 Mar 2010
Posts: 19236

View user's profile Send private message

PostPosted: Mon Jul 03, 2023 9:39 am     Reply with quote

There is one tiny thing that might have been causing problems, and
potentially still may.

unsigned int8 dummy;

Make this into a static.

The issue is that I see you are using interrupt priorities, and therefore
potentially interrupt nesting. The compiler as of a number of versions ago,
does not protect variables between each other when they are in different
interrupt levels. Hence it is possible that the 'dummy' variable could
overwrite another variable in a lower priority interrupt. Could give little
glitches that are hell to diagnose. So rule of thumb, when using nested
interrupts make sure that all variables used in the highest level are declared
as static so they are protected.
PICmodule



Joined: 26 Oct 2021
Posts: 32

View user's profile Send private message

PostPosted: Mon Jul 03, 2023 2:23 pm     Reply with quote

I finalized this routine, just need to clean up from my application and working very well on both processors. It is finally different and based on MC. Just please give me 1-2 days to deliver the project and then sit down and clean up my routines and publish them. Working very very well, tested many hundreds times
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group