- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I would like to programmatically change the communications component utilized by the bootloader on a PSoC5. Here's why. Normally I would bootload a bit of firmware over USBFS. However, there could be an alternative way of bootloading through a serial port that would be advantageous under certain circumstances. Is there a way to programmatically select which component is used before the bootloader component is initialized?
This statement in the data sheet is a little ominous: "Select one, and only one, communications component", but hey, I'm willing to try! I suppose one way to do this would be to create a custom component that would select the communications component functions of choice at that time. Any other ways?
Thanks.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cold use a self-written custom bootloader. The communication is in your hand, so you may select from different sources when you discover that they are present.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
True, there is that option. I was looking for something a little more out-of-the box. I am looking through the "custom" interface information now.
Edit: In the end, I simply created a new file with the custom communications interface function prototypes that allowed the correct function references to be called depending upon which configuration I wanted. For example:
#define USBFS 1u void CyBtldrCommStart(void) { #ifdef USBFS USBFS_Bootloader_CyBtldrCommStart(); #else PM_UART_CyBtldrCommStart(); #endif } void CyBtldrCommStop (void) { #ifdef USBFS USBFS_Bootloader_CyBtldrCommStop(); #else PM_UART_CyBtldrCommStop(); #endif } void CyBtldrCommReset(void) { #ifdef USBFS USBFS_Bootloader_CyBtldrCommReset(); #else PM_UART_CyBtldrCommReset(); #endif } cystatus CyBtldrCommWrite(uint8* buffer, uint16 size, uint16* count, uint8 timeOut) { #ifdef USBFS return USBFS_Bootloader_CyBtldrCommWrite(buffer, size, count, timeOut); #else return PM_UART_CyBtldrCommWrite(buffer, size, count, timeOut); #endif } cystatus CyBtldrCommRead (uint8* buffer, uint16 size, uint16* count, uint8 timeOut) { #ifdef USBFS return USBFS_Bootloader_CyBtldrCommRead(buffer, size, count, timeOut); #else return PM_UART_CyBtldrCommRead(buffer, size, count, timeOut); #endif }
Thanks for responding.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are always welcome.
Bob