The driver which can control the output max PWM for HSO of MC35XS3400

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The driver which can control the output max PWM for HSO of MC35XS3400

476 Views
hsieh_jaros
Contributor I

Hi Sir

I need to control output the Max PWM (1KHz) for HSO of MC35XS3400.

and design driver in MPC5744 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

The HS0 signal of MC35XS3400 always 12V DC output and No PWM signal with my driver

Please help me to correct the driver that it can control the output Max PWM for HSO of MC35XS3400.

P.S.

The following Picture is SPI signals that the HS0 is set output full PWM (XS_HS0 command is 0x84FF).
(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

IMG_20210129_160447.gif

0 Kudos
1 Reply

464 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi,

 

Quick question before diving into it - are you able to read back from these registers the previously written/programmed values?

 

Best regards,

Tomas

0 Kudos