Hardware conflict between timer5 and flash

I created a diagnostic for internal flash on the portenta H7 lite, with and without timer 5 clock enabled. Flash diagnostic works with clock for timer5 disabled, but fails when timer 5 clock is enabled. I am using platformio since arduino is incapable of compiling large projects which this was taken from.

It is unlikely I can use the portenta if I can't figure this out.

It will probably fail on the giga since it uses same processor.

I assume it will also fail if run from arduino ide.

flash_library_platformio.zip (2.7 MB)

I contacted st with a support ticket:
They said:
First line support needs to be asked of the supplier of the board and s/w. The product is not an ST Product so board and system validation has not been done by ST - Sorry

It appears as if this problem needs to be investigated by Arduino before ST will look at any potential problems in the stm23h747 ic. Could someone escalate this issue to the hardware/software support team at arduino.

If you want I can convert this diagnostic to run on arduino ide.

this is still an urgent ticket for the portenta that needs to be resolved.

Hi!
Please make it to be run on the Arduino IDE and we will have a look :slight_smile:

here is zip file with flash library diagnostic running with version 2.3.2 arduino ide.

pass 1-8 work fine (timer 5 not enabled)
pass 9-16 work fine (timer 5 enable, but disabled while writing to flash)
pass 17-24 fail when timer 5 is enabled while trying to write to flash.

Note PWMs have not even been started.
flash_library_diagnostic.zip (13.3 KB)

I made diagnostic work with arduino ide. If fails just the same as when I run it with visual studio code. What is next to fix this hardware/software(?) issue.

This is still broken. I believe it is a hardware issue with either the board or the ic. If it is with the ic, it has to be verified by the maker of the board (Arduino).

I have 4 pwm's controlled by TIM5 on my board. When I disabled timer 5 clock (__HAL_RCC_TIM5_CLK_DISABLE(); ) the motor moved since each of the 4 motors is controlled by 50% duty cycle = no power to motor using push pull control of motor. I have saved the pwm values and disabled the driver for the 4 motors controlled by TIM5. And restored the pwm values upon exit from WriteFlash. Write flash takes about 2 seconds to write, which means if the motor is maintaining a constant torque, that torque will be removed during the 2 seconds it takes to write to flash memory. It will work ok if no power is being sent to motor. Can someone on the hardware/software maintenance team please take a look at this. If something in the hardware/software has been changed since july of 24 to fix this let me know.