Data stream inside FLASH

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data stream inside FLASH

615 Views
quevedo
Contributor V

Hello,

 

I am working on a very simple project. The system simply plays a pre-recorded audio message. I would like to use a S08 microcontroller, with the audio output through PWM. 100kB will be enough for storing the message, so I thought about using the Flash program memory itself to store these 100kB of data stream.

 

Does anybody know how I can get this data (available in a HEX file) and store it inside the S08 Flash memory in compile time? Also, I need an efficient way to point to this data stream, so I can read the bytes.

 

Thanks in advance

 

Antonio Quevedo

Labels (1)
0 Kudos
Reply
1 Reply

361 Views
bigmac
Specialist III

Hello Antonio,

 

You will obviously be using a device of 128kB flash capacity, with paged memory.  It is likely that you would make use of the linear address pointer (LAP) to access the data.  Perhaps AN3730 may help to understand the process.

 

To directly program the data into flash, perhaps the HEX file should be adjusted for the required address offset, which would then be converted to S-records, that could be manually incorporated into the S19 file for the program.

 

One complication is that the data would need to be handled as two blocks, because of the position of the interrupt vectors, etc.  Your data read code would need to take into account the transition from the lower block to the higher block.

 

Regards,

Mac

 

0 Kudos
Reply