Protocol for serial download to P8X32A on initial boot?
CarlB
Posts: 2
I have a PIC24 (which provides USB OTG and serial hardware) connected to a P8X32A as:
P29/P30 connected to 24C512 EEPROM (I2C) and to the multi-master I2C #1 hardware interface on the PIC24
P31/P32 connected to the serial port (RxD,TxD as any two remappable I/O pins) on the PIC24
/RESET connected to an output bit (DTR as any output pin) on the PIC24
PIC24 controls a USB OTG interface and various I2C and serial I/O functions; P8X32A controls LCD video and user interface.
Microchip supplies example source code to build a standard USB-to-serial adapter and I've been able to get this code working to communicate effortlessly at up to 115200bps once a Propeller application is already up, running and using the serial port (I'd tried one of the examples which have the P8X32A loop back all serial data received)... but I can't get the Propeller Tool to download initial boot code to the processor. The only way I can get a programme into the P8X32A at the moment appears to be to ignore the PIC24's USB-to-serial capabilities initially, have the PIC dump the entire contents of the *.eeprom file for a Propeller application to the first 32Kb of external EEPROM and then have the PIC release /RESET on the Propeller so that it may boot from I2C EEPROM.
If I attempt to debug this on a storage oscilloscope, I catch the /RESET pulse (passed as DTR over the USB-serial link) followed by a burst of serial data in each direction. The propeller tool then displays an error message claiming that no P8X32A processor had been found on the serial ports.
Unfortunately, I cannot find anywhere in the datasheets or documentation where this serial protocol is specified. What should I be seeing sent from the propeller to the microchip? What should I see being sent back?
I know that the P8X32A has received the /RESET signal (as it, and the serial data sent in response, are visible as oscilloscope traces) but have no means (based on the incomplete description in the datasheet) to know what the Propeller Tool didn't like in the data being transmitted.
Any change to the polarity of DTR or the duration of the /RESET signal appears not to help; I've also attempted to adjust bit rate slightly to match that of the data sent by the P8X32A (as a propeller runs on internal-RC clock during bootup, therefore slightly off-frequency compared to the rock-solid crystal-controlled bit rate of any USB to serial converter) without any visible improvement. The propeller tool just will not recognise a P8X32A connected through this USB-to-serial interface.
The only example hardware available appears to be based on the FTDI 232 BL USB to Serial chip in some form; even the Chameleon boards (which have a PIC24, but in a Microchip version with no on-chip USB capability) appear to follow this same formula of hanging this one specific hardware USB-to-serial chip from P31/32 as the sole USB support for an application.
Should I be able to use any USB-to-serial (including the Microchip-supplied PIC24 code on their USB OTG processor) or is the Propeller Tool interface limited somehow to only support FTDI232-based designs? With no description of the serial download protocol in the docs and nothing other than FTDI232 designs currently available for reference, there's little to use as a basis for debugging this communication link if I'd prefer to use the PIC24's existing USB-serial support to boot a P8X32A on the same board.
P29/P30 connected to 24C512 EEPROM (I2C) and to the multi-master I2C #1 hardware interface on the PIC24
P31/P32 connected to the serial port (RxD,TxD as any two remappable I/O pins) on the PIC24
/RESET connected to an output bit (DTR as any output pin) on the PIC24
PIC24 controls a USB OTG interface and various I2C and serial I/O functions; P8X32A controls LCD video and user interface.
Microchip supplies example source code to build a standard USB-to-serial adapter and I've been able to get this code working to communicate effortlessly at up to 115200bps once a Propeller application is already up, running and using the serial port (I'd tried one of the examples which have the P8X32A loop back all serial data received)... but I can't get the Propeller Tool to download initial boot code to the processor. The only way I can get a programme into the P8X32A at the moment appears to be to ignore the PIC24's USB-to-serial capabilities initially, have the PIC dump the entire contents of the *.eeprom file for a Propeller application to the first 32Kb of external EEPROM and then have the PIC release /RESET on the Propeller so that it may boot from I2C EEPROM.
If I attempt to debug this on a storage oscilloscope, I catch the /RESET pulse (passed as DTR over the USB-serial link) followed by a burst of serial data in each direction. The propeller tool then displays an error message claiming that no P8X32A processor had been found on the serial ports.
Unfortunately, I cannot find anywhere in the datasheets or documentation where this serial protocol is specified. What should I be seeing sent from the propeller to the microchip? What should I see being sent back?
I know that the P8X32A has received the /RESET signal (as it, and the serial data sent in response, are visible as oscilloscope traces) but have no means (based on the incomplete description in the datasheet) to know what the Propeller Tool didn't like in the data being transmitted.
Any change to the polarity of DTR or the duration of the /RESET signal appears not to help; I've also attempted to adjust bit rate slightly to match that of the data sent by the P8X32A (as a propeller runs on internal-RC clock during bootup, therefore slightly off-frequency compared to the rock-solid crystal-controlled bit rate of any USB to serial converter) without any visible improvement. The propeller tool just will not recognise a P8X32A connected through this USB-to-serial interface.
The only example hardware available appears to be based on the FTDI 232 BL USB to Serial chip in some form; even the Chameleon boards (which have a PIC24, but in a Microchip version with no on-chip USB capability) appear to follow this same formula of hanging this one specific hardware USB-to-serial chip from P31/32 as the sole USB support for an application.
Should I be able to use any USB-to-serial (including the Microchip-supplied PIC24 code on their USB OTG processor) or is the Propeller Tool interface limited somehow to only support FTDI232-based designs? With no description of the serial download protocol in the docs and nothing other than FTDI232 designs currently available for reference, there's little to use as a basis for debugging this communication link if I'd prefer to use the PIC24's existing USB-serial support to boot a P8X32A on the same board.
Comments