CYW43907 Boot question

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MaFa_974161
Level 5
Level 5
100 sign-ins 50 replies posted 50 questions asked

Hello,

I'm new in WICED.

I want to develop a board where I don't want to mount external SPI_FLASH.

Is there a way to load program from uSD ?

Fox example using a specific bootloader ...

I want to connect FPGA to SPI_FLASH interface in order to exchange data at high throughput ...

0 Likes
1 Solution
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

DCT file contains important information about the network and WiFi operations. If you do  not want  the DCT file on SFLASH, you need to make sure to store it somewhere else probably on FPGA. Or else, make sure to perform WiFi operations without incorporating DCT if high-level WICED APIs are used with the help of some other file.

Thanks

Aditi

View solution in original post

0 Likes
5 Replies
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hello,

For your reference, the filesystem, OTA application, factory reset application, Wifi firmware, APP0,APP1, APP2, by default all goes in external (serial) flash. There is no specific bootloader that can download the program from uSD card. The waf.bootloader provided in the WICED SDK is a part of the WICED Application Framework (WAF). It is Located at Wiced-SDK/apps/waf/bootloader/bootloader.c .It loads the program image from SFLASH. This implementation is done by the function --> load_program().

For loading the program from uSD, various changes will be required in the SDK itself to first of all, load the program into the uSD instead of flash. Then the bootloader will have to be modified to load the program from uSD instead of SPI flash. This process won't be a straightforward one and you may have to do various modifications. It needs a lot of rework to the existing SDK. There are no specific boot pins that can load the program directly from SD card. I hope this helps.

Thanks

Aditi

OK.

Thankyou very much,

You are very clear.

I explain my problem :

I have to interface WICED to an FPGA with a bus that supports at least 20MBps.

I would to connect FPGA to WICED SPI_FLASH bus using some external electronics between WICED SPI_FLASH and FLASH/FPGA in this way:

1. after reset (before boot) WICED see FLASH connected, it downloads filesystem, OTA application, factory reset application, Wifi firmware, APP0,APP1, APP2 into internal RAM .

2. after boot my Firmware running in WICED selects FPGA (for example putting a GPIO in a low state) and un-select FLASH, so WICED can read data from FPGA using init_sflash and sflash_read

I don't know if it is possible , please give me some indications if I'm right or wrong.

0 Likes
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hello,

Correct me if I am wrong, but my understanding according to your response is that you want to have a scenario where there is 1 SPI master and 2 SPI slaves, 1 slave being the SPI Flash and the other being the FPGA that you'll interface.

The application that you are planning to do haven't been tested on our side. But definitely you can go ahead and test this and let us also know the updates on this feasibility check. There are some points that I would like to highlight-->

1. As mentioned at the time of boot, you want to select the SPI slave as SFLASH. You download all the contents on to the SFLASH and then copy the contents on to the RAM. For your reference, all the contents of the SFLASH can't be copied onto the RAM as it couldn't suffice everything due to space issue. But yes, at the time of bootloading, the program image if valid will get copied onto the RAM. You will have to make sure whatever is required on your side should get copied onto RAM properly so that you can switch to FPGA. For ex: There is a section DCT_IMAGE in the SFLASH that stores the image of DCT. So, any WiFi operations such as network join require the DCT if high level WICED APIs are used. This DCT will be present in SFLASH so you may have to perform Wi-Fi operations without using DCT or incorporate DCT into FPGA.

2. You will require a separate chip select pin for FPGA and you need to make sure that CS pin of SPI flash gets deasserted and CS pin of FPGA gets selected at the time of switching. You need to make sure that the dedicated CS pin for FPGA gets low provided the CS pin of SPI Flash is deasserted.

3. You will have to modify the init_sflash and sflash_read functions because these functions are implemented for the SPI Flash. These functions get the platform interface ready for SPI Flash and initializes the hardware for it, sets up the capabilities of the SFLASH and reads the ID, verifies it. You may have to rewrite the SPI Flash API definitions to avoid issues.

4. Also,The CS pin of SPI is operated by the hardware, this pin is pulled down automatically at the time of transfer and mostly you'll be dedicating a GPIO pin as a CS for FPGA interface. You need to check that when you enable the CS pin in the software for FPGA, the hardware doesn't set the CS pin at the same time. This will cause issues and may send the similar data to SFLASH and FPGA. So, you may need to do the required changes.

I hope this helps!

Thanks

Aditi

0 Likes

Thankyou very much for your clear answer.

Hereafter our comments.

1. We are using BMC43907 Device and we want to use WiFi Direct or P2P as Group Client (not STA or AP). We want to use (in the future) Ethernet and USB. So we think that there is no DCT section. Are we right ?

2. Yes, we develop a board where we manage in a right way FPGA_CS (via software) and FPASH_CS with some external elctronics.

3. Next step is evaluate how much work is to modify init_sflash and sflash_read to our purpose ... we hope at least one week.

4. Yes, we use some external electronics.

You confirm that If we not use DCT file the FLASH is read only at boot to load all necessary .. ? And after this process we can interface FPGA ?

0 Likes
Aditi_B
Moderator
Moderator
Moderator
500 replies posted 5 questions asked 250 replies posted

Hi,

DCT file contains important information about the network and WiFi operations. If you do  not want  the DCT file on SFLASH, you need to make sure to store it somewhere else probably on FPGA. Or else, make sure to perform WiFi operations without incorporating DCT if high-level WICED APIs are used with the help of some other file.

Thanks

Aditi

0 Likes