cancel
Showing results for 
Search instead for 
Did you mean: 

radio init planting

Hugo_VOLA
Associate II

Hello,

I'm using a STM32WL55JC in dual core configuration to communicate with LoRa protocol.

I'm also working on an OLED display interface using I2C communication on the same MCU.

I have a working application using LoRa communication without OLED interface.

The OLED interface work well also without the LoRa application.

But when I join the two project, the radio init function drive me into errorhandler...

After investigating I find some weird happening...

First, the radio init bug occured only when I'm calling ssd1306_WriteString. But it doesn't matter what is in this function, in fact if I comment everythings in it, its still bugging... So just the fact that I'm calling it make my programm bug... May it come from parameters of the fonction ?

Secondly, If I call ssd1306_WriteString before the radio init, it print what I want on the screen and when radio init happen it's bugging... But also, if I'm calling ssd1306_WriteString after radio init, it's bugging on radio init... How it can be possible ?? ssd1306_WriteString was never called and it make bug radio ???

I really can't find any links between all of this....

There is more detail on ssd1306_WriteString font parameter :

typedef struct {

const uint8_t FontWidth;  /*!< Font width in pixels */

uint8_t FontHeight;  /*!< Font height in pixels */

const uint16_t *data; /*!< Pointer to data font data array */

} FontDef;

3 REPLIES 3
Hugo_VOLA
Associate II

I find out that this must be a memory problem.

The data member of FontDef is an bitmap array of the font for all ASCI table and It was declared as static const (so in the flash I guess).

I try to delete static et const and its start to work. But Now when I add more datas (bitmap images) It's planting when a restart occured, When the programm check refTable validity

0693W00000Nq77yQAB.png 

I assume that the reserved memory for CM4 is too small for this kind of data and that its righting over CM0+ Datas...

How can I change memory mapping ?

The Linker Script or Scatter File will describe how the link positions information.

For the SH1106/SSD130x I typically keep my fonts in FLASH.

I'm using them with other LoRa implementations, without issue.

Make sure you're not blocking.

I would buffer pending data so as not to hang up other code waiting for the screen to paint, and upload via I2C, in an idle task, or slack time in the main loop;

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

@Community member​ Thanks for your answer !

Just few more question so that I understand well.

  • For the linker script do you create a new section, or just grow up an existing one ?
  • And to save datas in FLASH, what is the thing to do ? Put const or/and static befor ?
  • Do you know a tool that can be use to have a view of memory state ? (FLASH and RAM filled diagram for exemple)
  • Do you have any ressources that can be use to understand more all of that ?

Thanks