Hi Sir
I need to control the HSO of MC35XS3400 that output Max PWM (1KHz).
The MCU is MPC5744 and My program actions is following:
1. Initial SPI function
|-> DSPI_Init(ES_SPI,1, MCU_CLK, ES_BR, 16); // SPI_0 init
2. Set Eswitch is Normal mode
|-> RLY_RSTB15_ENABLE; // RST set pull high
3. Register inital
(1) XS_PWMR_INIT
|--> XS_HS0 command is 0x847F
|--> XS_HS1 command is 0xA47F
|--> XS_HS2 command is 0xC47F
|--> XS_HS3 command is 0xE47F
(2) XS_CONFR0_INIT
|--> XS_HS0 command is 0x8828
|--> XS_HS1 command is 0xA828
|--> XS_HS2 command is 0xC828
|--> XS_HS3 command is 0xE828
(3) XS_CONFR1_INIT
|--> XS_HS0 command is 0x8C34
|--> XS_HS1 command is 0xAC34
|--> XS_HS2 command is 0xCC34
|--> XS_HS3 command is 0xEC34
(4) XS_OCR_INIT
|--> XS_HS0 command is 0x9000
|--> XS_HS1 command is 0xB000
|--> XS_HS2 command is 0xD000
|--> XS_HS3 command is 0xF000
(5) XS_GCR_INIT
|--> XS_GCR command is 0x94C2
4. HS0 control
(1) HS0 config
|--> HSO_config command is 0x8828
(2) set HS0 is output full PWM
|--> RLY_15IN0_ENABLE; // IN0 set pull high
|--> XS_HS0 command is 0x84FF
When The HS0 is setting output full PWM and the SPI signal is following:
1. The yellow Line is MOSI.
2. The Green Line is MISO
3. The Blue Line is CS
4. The Pink Line is SCLK
5. The SCLK is set 1MHz
The HS0 of MC35XS3400 is always 12V and No PWM signal.
Is the output status correct or not ?
Help me check my program and tell me how to control, please.
Thank you.
The Supplement of Picture
1. The yellow Line is MOSI.
2. The Green Line is MISO
3. The Blue Line is CS
4. The Pink Line is SCLK
5. The SCLK is set 1MHz