Custom code for firmware download?

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

cross mob
bpringlemeir
Level 1
Level 1
First like given First reply posted First question asked

In the document AIROC-HCI-Firmware-Download.pdf, it states that the main ROM/Flash only  supports the 'Read memory', 'Write memory' and 'Launch' commands.

What are the supported commands in the minidriver?

  • CRC32
  • Baud change
  • Chip erase

See: section 4.

The mini-driver image is 9kB on my platform, but I only need to perform a crc32 to determine if the image needs to be updated.   I think this can be implemented in <1kB, if it is not table driven.   Can I write my own code to run at the minidriver address, perform a CRC32, store the result and then return to the ROM code to read the result?

 

0 Likes
1 Solution
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @bpringlemeir 

It is not advised to modify the minidriver code. It will effect the firmware download flow especially for On-chip flash devices. 

Minidriver
The minidriver is separate FW independent of the ROM code. It is used to download the application code to the
on-chip flash. The minidriver contains code to interpret certain HCI commands such as WRITE_RAM and
READ_RAM and execute those commands. To download the code to the on-chip flash, first the minidriver needs
to be written and executed from SRAM, which will interpret further HCI commands and write the code to the
correct location in flash. As soon as the code download is complete, the minidriver is discarded because it is no
longer needed.

View solution in original post

2 Replies
AnjanaM_61
Moderator
Moderator
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @bpringlemeir 

It is not advised to modify the minidriver code. It will effect the firmware download flow especially for On-chip flash devices. 

Minidriver
The minidriver is separate FW independent of the ROM code. It is used to download the application code to the
on-chip flash. The minidriver contains code to interpret certain HCI commands such as WRITE_RAM and
READ_RAM and execute those commands. To download the code to the on-chip flash, first the minidriver needs
to be written and executed from SRAM, which will interpret further HCI commands and write the code to the
correct location in flash. As soon as the code download is complete, the minidriver is discarded because it is no
longer needed.

bpringlemeir
Level 1
Level 1
First like given First reply posted First question asked

I don't want to modify the minidriver code.  I wanted to write my own minidriver, but it sounds like this is not supported.  I think the best option is to use the 'READ_RAM' command to inspect a known location in the BT-App to determine what version is currently flashed.  The 2nd chip programming the BT-App is verified and validated with software paired to a version of the BT-App, so I wish to ensure that on every boot that they match.  Having to load the minidriver to perform a CRC32, consumes quite a bit of time during boot, reducing time to functionality.

The 'READ_RAM' is not as reliable as the image could be corrupted.

0 Likes