cancel
Showing results for 
Search instead for 
Did you mean: 

AN5293 migration F7 - H7: identical peripherals if not mentioned?

LCE
Principal

Heyho,

just checking the migration guide AN5293 for some peripherals I have not yet ported from F7 to H7:

if not mentioned in the document, are the peripherals completely and 100% identical (registers & bits) ?

Just checked for I2C, and it is not mentioned (except there's an additional I2C5 on H7 or so).

4 REPLIES 4
tjaekel
Lead

My suggestion when you port from F7 to H7:

  • check the pinmux table of both:
    it can be that they differ on which pins are populated, which functions the pin can have etc.
    You should never rely on "same pins still with same features" - find the difference via comparing both datasheets.
  • it is quite likely, that you find the same signal, e.g. SPI1_SCLK, but on a different pin
  • If you setup a project for a new MCU - always go with the correct HAL drivers:
    Never try to reuse HAL code, drivers, intended for a different MCU. At least all the HAL, CubeMX, ... has to be the "correct" one.
  • Look if you have BSP files:
    Also the BSP files have to be changed. Check carefully that you go with the "correct" BSP for your new board.

At the end, with all the "correct" H-files - you should be able to use the "same" register again, even it would be on a different address. As long as the H-Files are the right ones - a "symbolic register' name should be mapped properly, even it would be a different address.

BUT: there is no guarantee, that with "new" HAL and BSP files - there could be a name change (on API calls, on typedefs, on register and pin names). Just be smart.

And it also happen, that something, e.g. a register, a member in a structure, is not available anymore or it works now slightly different.

Best approach is:
look for examples for this new board (in HAL, BSP) and adapt your code: mainly you have features, like SPI, I2C: do not expect a 1:1 code compatibility. But to bring up SPI, I2C again with new HAL drivers and examples as reference will help you.

Embedded FW is very dependent on the HW: do not expect full code compatibility when changing from one MCU to another. But the features should be possible as before, maybe a bit differently to configure and use.

LCE
Principal

@tjaekel thanks for your reply.

I'm already working successfully with H7 (Nucleo H723, H735 disco) for some months now, I know about the hardware and pinout differences.

There is just one peripheral left I have not taken over from the F7 firmware, and that's the I2C peripheral.

For most peripherals I do not use HAL or LL or BSP from ST, so it's important for me to know if a peripheral that is not mentioned in the migration guide is 100% and bit by bit compatible between F7 and H7.

I'm just too lazy to compare that by myself... but I guess I'll better do that.

LCE
Principal

Until now I only found one difference in the I2C registers:

in H7's I2C there is this additional bit:

Bit 18 WUPEN: Wakeup from Stop mode enable

That's not too bad, but it is not mentioned in the migration guide.

 

LCE
Principal

@Imen.D or @Peter BENSCH  Could you please comment on the following basic question:

If not mentioned in the document (migration AN5293), are the peripherals completely and 100% identical (registers & bits) ?

Except for the one bit I already found to be different... but concerning setup, control and data flow and handling?