Flash Status Register Question (PROGE / LOCKE vs. RDY) (UC3C0512C)

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear freaks,

 

from studying the Flash Controller Section of the UC3C0512C manual, I still don't know the answer to the following question:

 

When having given a command to the flash controller and then polling the FSR for command completion, will PROGE and LOCKE (if applicable) set at very exact moment as RDY is set? In other words, could it be that PROGE or LOCKE are set *before* RDY is set?

 

I have inherited code that first gives a command to the flash controller and then polls the FSR for (PROGE OR LOCKE OR RDY) and then continues, possibly giving other commands to the flash controller. Now, if PROGE and LOCKE could appear before RDY appears, that would be a bug.

 

Could anybody answer this or provide some links?

 

Thank you very much,

 

Binarus

 

Last Edited: Fri. Jan 27, 2017 - 10:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don't know UC3 but what I would suggest is that you take a look at any code in ASF that deals with the flash controller of UC3. It's written by Atmel engineers so presumably shows the "right way" to operate the device.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@clawson Thanks for bothering. I will do so if I don't get a definitive other answer.

 

I am very mistrustful towards the ASF. Actually, in 2011, when I began with AT32, the crap that has been in there at that time has cost me weeks and a significant portion of my health (no lie) because of wrong register addresses, all sorts of other errors / wrong code / code contradicting the manuals and extremely bad coding style. Since then, I never have looked into it again. Hoping they have exchanged the "engineers" ...

 

So it would be great if somebody who knows by theory or has seen appropriate documents could share the knowledge.

 

Furthermore, the code I have inherited is released and in the wild for a long time, so I can't change it at the moment (medical device, new release = very much money). So I need to find out if this is a bug or not. I doubt that the ASF will answer that question. If they do it another way, I still don't know if the code I have inherited is correct.

Last Edited: Fri. Jan 27, 2017 - 11:10 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yup, your experiences mirror a lot of people's with ASF - I was simply suggesting it as a "backstop" to see how someone else handled it.

 

(of course if you do explore ASF you will find that it's probably nested 10 functions deep before you get anywhere near the actual code dealing with bits in registers - it can be a bit impenetrable in its attempt to provide all things to all people).