- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We use PSoC4L with USB and SPI components.
And now We are considering implementing Bootloader.
We read the application notes of SPIBootloader and USB HID Bootloader, and understand the operation of each.
Therefore, we are considering the following specifications,
For example,
When PSoC4L is powered on while pressing switch A, SPI Bootloader starts.
When PSoC4L is powered on while pressing switch B, USB HID Bootloader starts.
We thought that we could do this by switching the communication components of the Bootloader component,
but we don't know how to switch because that API does not exist.
Is it possible to use a Bootloader that switches multiple communication peripherals in the first place?
Do you have a reference project if possible?
Regard,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't tried this but I have an idea.
You can use a custom interface for the bootloader. So, it is able to create delegated function to access to multiple communication ports.
The bootloader requires five functions as follows.
- CyBtldrCommStart
- CyBtldrCommStop
- CyBtldrCommReset
- CyBtldrCommWrite
- CyBtldrCommRead
For example, CyBtldrCommStart(void) function can be written as follows.
uint32 interface = 0;
void CyBtldrCommStart(void) {
switch (interface) {
case 0:
SPI_1_CyBtldrCommStart();
break;
case 1:
USBFS_1_CyBtldrCommStart();
break;
default:
break;
}
}
Please note that the variable interface indicates a communication port to be used.
Please refer the document "PSoC® Creator™ Component Author Guide" (Document # 001-42697) at the "10. Adding Bootloader Support (Advanced)" section.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't tried this but I have an idea.
You can use a custom interface for the bootloader. So, it is able to create delegated function to access to multiple communication ports.
The bootloader requires five functions as follows.
- CyBtldrCommStart
- CyBtldrCommStop
- CyBtldrCommReset
- CyBtldrCommWrite
- CyBtldrCommRead
For example, CyBtldrCommStart(void) function can be written as follows.
uint32 interface = 0;
void CyBtldrCommStart(void) {
switch (interface) {
case 0:
SPI_1_CyBtldrCommStart();
break;
case 1:
USBFS_1_CyBtldrCommStart();
break;
default:
break;
}
}
Please note that the variable interface indicates a communication port to be used.
Please refer the document "PSoC® Creator™ Component Author Guide" (Document # 001-42697) at the "10. Adding Bootloader Support (Advanced)" section.
Regards,
Noriaki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Noriaki-san,
Sorry for my late response.
We will try your suggestion.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are considering the content you have proposed.
And we create a project to realize the operation.
If you have any problems creating a project, please provice us your advice again.
Thanks,