Portenta H7 analogWrite crash

Hello i'm trying to control RGB led on the analogs pins A0 .. A6 on the portenta H7.
But every time i run the line "analogWrite(a0,255);" the code freeze and the red led in the board blink.
i tried analogRead it seem works and i tried to change some parameter i even tried on a other new portenta H7 board and i get the same result.

I have no clue of what to do i need help.

#include <Scheduler.h>
const int a0 = A0;

void setup()
{
  Serial.begin(9600);
  pinMode(a0,OUTPUT);
  analogWriteResolution(8);
}

void loop()
{
    delay(5000);
    analogWrite(a0,255);
}

Those pins are input only. You can't use analog write on the analog pins!
Look at the pinout, where the PWM pins are.

Thanks.
i found somes where it work i can keep progress in my project now.
ps: its very not intuitive to analogWrite on digital pin but till it work and i understand why, its the more important.

Due to the pin architecture pins A4,A5,A6 will work as an output:

All pins with the "_C" are directly connected to the ADC.

From the datasheet RM0399 ( STM32H745/755 and STM32H747/757 advanced Arm®-based 32-bit MCUs - Reference manual)