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

PIC24FJ64GA004 code memory problem

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
fuxafak



Joined: 08 Nov 2013
Posts: 11
Location: Istanbul

View user's profile Send private message

PIC24FJ64GA004 code memory problem
PostPosted: Tue Dec 23, 2014 10:54 am     Reply with quote

Hi All,
I use PIC24FJ64GA004 for an automation project. The board includes uC, Nordic nRF905 tranceiver, Micron m25pe20 serial flash memory and offline buck converter. Board has relatively high EMI because of power supply circuit. I have very strange problem which is:

We have totally 250 circuit which are working together. My code has a bootloader code at starts and then application code below. If new firmware are sent from router, device would write it to ext memory and then when it restart itself it reads all memory from external memory and write them to code memory (from beginning to end as normal). But i have newer use that function for that devices yet. Despite this, some devices code memory last byte or last page is change to 00. If somehow my code erase the code memory, it will be all ff.

Code:

:104D4000FFFFFF00FFFFFF00FFFFFF0000FEFF006F
:104D50000000000000000000000000000000000053


It is like that. All these memory should be ff as my compiled code. So, i dont know how these bytes turned into zero :(

My opinions:
EMI can cause fault data at spi pin with external memory or icsp pin. It causes faulty things and the code memory are gone Smile But external memory should sent some data like
Code:

:104D50000000000000000000000000000000000053

to erase that memory. These code hasn't any code because i didn't upgrade firmware yet. So ext memory also should have all ff for code memory. And another darkness about these opinion is: If external memory fails at the beginning of code, the remaining code memory should also corrupted. But it all verified.

Somehow, uC code memory bulk pin goes to ground for spesific addresses (probably only last page) and it makes these bytes all zero! I don't know where the code memory bulk pin is or whether is it being Smile

Hmm, please give your opinions about that. That's so weird..

Thanks
ufuk safak
_________________
-ufuk safak-
Istanbul Technical University
temtronic



Joined: 01 Jul 2010
Posts: 9123
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Dec 23, 2014 12:34 pm     Reply with quote

You MUST get rid of the EMI !
sounds simple BUT can be a nightmare to do. You need to add filter caps, use wider traces, proper grounds, redesign PCB layout, add chokes, etc.
Some are easy, like adding caps, cutting traces to install chokes.

ANY EMI can cause 'weird' stuff to happen so don't be fooled thinking it's the PICs fault. Use a scope and see what/where the EMI is. Noisy power supply ? Use a linear based one or add a LOT of filtering to the switcher.

NO amount of 'clever code' will ever fix a hardware EMI problem.

hth
Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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