5213 Use In Embedded Equipment

Discussion to talk about hardware related topics only.
Post Reply
prenning
Posts: 1
Joined: Mon Sep 01, 2008 4:31 pm

5213 Use In Embedded Equipment

Post by prenning »

I'm in need of some information with regards to how to reprogram the
flash in the 5213 once the device is embedded in a final assembly. In
the product that I'm developing, all three of the serial interfaces are
connected to devices internal to the product, one of which is a
Bluetooth receiver. So my questions are as follows:

1. Can I reprogram the 5213 from the Bluetooth link (Serial Port
Profile) and if so, how do I accomplish this? I understand that I'll
probably have to have SerialUpdate running as a task but what is the
command sequence required via the BT interface to put the 5213 into the
proper mode?
2. Does the Bluetooth interface have to be connected to Serial Port 0
to be able to reprogram the 5213 or can reprogramming be done thru any
serial port?
3. Any example code somewhere to look at?

Thanks.
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: 5213 Use In Embedded Equipment

Post by lgitlitz »

Hi,

You can reprogram the MOD5213 on either UART0 or UART1. The serial port must be open in your application and EnableSerialUpdate(); must be called in your init. If you are using the polling serial driver then the update can only occur when you are pending on a serial port, such as a read. If you are using the interrupt version then this is not a problem.

The blue-tooth device should not be an issue since this layer should be invisible to the serial update application which only sees it as a com port. This is similar to what occurs when using a USB to serial adapter. Just make sure you have software flow (XON/XOFF) enabled on the PC side, and MTTTY if you are using it, or you will have transfer errors with faster bauds.

The serial update happens when any port receives 2 magic chars in a row on any of the serial ports. This magic char is defined at the top of:
C:\Nburn\MOD5213\system\irq_serial_init.cpp
By default the value is 0xFC but you can change to anything you want. If your application will be receiving binary (non-ascii) serial data you may not be able to use serial update since the incoming data may trigger the serial update process.

-Larry
Post Reply