| Author | beginning argument ( Replies received: 4 ) |
| tiofabby |
Posted 04-05-2007 at 20:42   |

Registered on : 05-04-2007
From France
Messages : 4
OFF-Line
|
Hello
I use Keil tool to program. I recently bought a rfid dev kit containing a uPSD3422EV. I am new in ST environment and I d like to know if I really need to buy the Keil ULink cable to be able to program (via ISP) my ST microcontroller?
Is there any cheaper way (or cable) to do the same?
Thank you in advance for your time.
Regards
fabrice
|
|
|
Profile
Quote
|
| vgram |
Posted 07-05-2007 at 10:56   |

Registered on : 12-04-2006
From Greece
Messages : 9
OFF-Line
|
Didn't the Dev kit contain a programming adapter for Keil?
If not then (as far as I know), there is no other way to program the uPSD for the first time other than the Keil or Resonance adapter.
Once you have programmed the uPSD one time you can create a resident code that will erase/write the flash with your new code from any other peripheral(SPI,Serial UART, USB) etc
|
|
|
Profile
Quote
|
| tiofabby |
Posted 07-05-2007 at 11:12   |

Registered on : 05-04-2007
From France
Messages : 4
OFF-Line
|
Thanks a lot for your reply!
I will check if there is a programming adapter once I get the dev kit (should be this week my supplier told me).
If not I will buy the ULINK adapter.
Concerning "resident code that will erase/write the flash with your new code" you mentionned, do you know where i could get an example of this kind of code?
Have a good day!
fabrice
|
|
|
Profile
Quote
|
| vgram |
Posted 09-05-2007 at 10:46   |

Registered on : 12-04-2006
From Greece
Messages : 9
OFF-Line
|
Fabrice,
I don't know if there is an example in the uPSD support page in this site(st.com). Check it out first.
If not I can suggest some ways of how to do it, but I don't have an operational code that I can send you.
The simplest way to do it is the following:
1) Reserve some flash space (preferably at the end of the flash) for your "boot loader" or boot code. 1 to 5 kBytes should be enough.
2) Your application then must have a deliberate jump to the boot code whenever you want to write the flash. The jump can be performed by an external event (e.g a port pin going low) or software jump.
3) The boot code should then take over the software flow. This means that you should initiate all registers and interupts or else you might be stopped by one of them. The best way is to cause a software reset to the uPSD and upon entry you jump to the boot code immediatelly.
4) Once the uPSD is running the boot code then you can synchronize with a PC and download the object file. The flash control is summarized in the last pages of the uPSD manual.
Good luck.
|
|
|
Profile
Quote
|
| tiofabby |
Posted 09-05-2007 at 11:31   |

Registered on : 05-04-2007
From France
Messages : 4
OFF-Line
|
Thanks a lot for your help and these good advices!
I really appreciate
fabrice
|
|
|
Profile
Quote
|