cancel
Showing results for 
Search instead for 
Did you mean: 

STM32cubemx is possibly missing parameters and linkers for stm32h743i in FMC, USB and ethernet

Brian Khuu
Associate III

While trying to convert your CubeMXH7 examples to cubemx for testing purpose. I came across some issues in terms of trying to synchronise the settings. I've written a comparison function to check how close I can get the cubemx generated code to the CubeMXH7 examples and found some parameters seems to be missing.

```

--> SYS Init Correspond to CubeMXH7 Example

--> QSPI Init Correspond to CubeMXH7 Example

--> SD Init Correspond to CubeMXH7 Example

 * hnor.Init.WaitSignal != FMC_WAIT_SIGNAL_ENABLE : (got 0x00 = 0) (exp 0x2000 = 8192) CubeMX is missing the ability to set t.

 * hnor.Init.ContinuousClock != FMC_CONTINUOUS_CLOCK_SYNC_ASYNC : (got 0x00 = 0) (exp 0x100000 = 1048576) CubeMX is missing t.

--> NOR Init Mismatched to CubeMXH7 Example

--> SDRAM Init Correspond to CubeMXH7 Example

--> SRAM Init Correspond to CubeMXH7 Example

--> ETH Init Correspond to CubeMXH7 Example

 * hpcd.Init.dev_endpoints != 8 : (got 0x09 = 9) (exp 0x08 = 8) CubeMX is missing the ability to set this value.

--> USB FS Init Mismatched to CubeMXH7 Example

 * hpcd.Init.dev_endpoints != 8 : (got 0x09 = 9) (exp 0x08 = 8) CubeMX is missing the ability to set this value.

--> USB HS Init Mismatched to CubeMXH7 Example

```

Specifically in Stm32CubeMX:

  • In USB hpcd.Init.dev_endpoints parameter is missing
  • In FMC : Multiple Timing parameters is missing.
  • In FMC : Cannot locate hnor.Init.WaitSignal parameter is missing
  • In FMC : Cannot locate hnor.Init.ContinuousClock parameter is missing
  • In Ethernet : Linker definition is missing for `RxDecripSection` `TxDecripSection` and `RxArraySection` for `>RAM_D2 AT> FLASH`

Also I request the ability to cross reference init parameters in the generated code with the parameter in Stm32CubeMX (This can be via code comments, or via a search function in the GUI).

Also considering the number of missed parameters, it would be appreciated if there is a way to add override parameters in the GUI. This is since there is no way to manually edit the generated code without losing your changes on the next code regeneration. You could always add a notification to remove the override when the missing parameter is added on the next CubeMX. This will also provide a chance for your software to notify developers that you are missing a parameter, if developers keeps adding a specific parameter override.

-----------------

## Specific Details on Ethernet in STM32CubeMX code generation

This is may be okay if it's expected that engineers would add this manually, but it may be good to note if not already done so.

In ~/STM32Cube/Repository/STM32Cube_FW_H7_V1.5.0/Projects/STM32H743I-EVAL/Applications/LwIP/LwIP_TCP_Echo_Server/SW4STM32/STM32H743I_EVAL/STM32H743XIHx_FLASH.ld , when compared to the code generation in stm32cubemx you can see that it is missing this linker definition between `} >RAM_D1` and `Remove information from the compiler libraries` line in the linker script. Specifically this section.

 ```

 .lwip_sec (NOLOAD) : {

  . = ABSOLUTE(0x30040000);

  *(.RxDecripSection)

  . = ABSOLUTE(0x30040060);

  *(.TxDecripSection)

  . = ABSOLUTE(0x30040200);

  *(.RxArraySection)

 } >RAM_D2 AT> FLASH

 ```

0 REPLIES 0