GD3162 Daisy Chain

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

GD3162 Daisy Chain

296 Views
xingyun
Contributor II

Using the serial mode with the MCU to access 6 GD3162 devices, could you please explain how to configure the EB? Also, do I need to first set the working parameters using the registers, and then send and receive data? How should I send and receive data? I have read the official GD3162 sample code, but I don't understand how to use the daisy chain method to enable the MCU to communicate with the 6 driving peripherals.

0 Kudos
Reply
1 Reply

277 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Dear Qian,

all six GD3162 devices share the same MOSI / MISO / SCLK / CSB. The devices are connected in series, forming one long shift register. Each GD3162 requires a 24‑bit frame. Please refer to the section 12. in the GD3162 full datasheet for the SPI interface description.
Screenshot_1.png
Please download the full GD3162 datasheet from the GD3162 product page, under the Secure section.
Screenshot_2.png
In the Figure 43. is shown SPI timing, from which required SPI mode can be deduced. 
 
JozefKozon_0-1774339042724.png
 
SPI mode Clock polarity
(CPOL)
Clock phase
(CPHA)
Data is shifted out on Data is sampled on
0 0 0 falling SCLK, and when SS activates rising SCLK
1 0 1 rising SCLK falling SCLK
2 1 0 rising SCLK, and when SS activates falling SCLK
3 1 1 falling SCLK rising SCLK

Figure 47. shows Daisy chain data transmission. 

In the Table 34. are listed SPI registers. 

Do I need to configure registers first?

[A] Yes. All GD3162 devices must receive their configuration via SPI before entering normal PWM operation.
If some devices need different settings, write to all first, then overwrite the ones that differ. Add 100us delay after each register write. 

With Best Regards,
Jozef
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2338128%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EGD3162%20Daisy%20Chain%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2338128%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsing%20the%20serial%20mode%20with%20the%20MCU%20to%20access%206%20GD3162%20devices%2C%20could%20you%20please%20explain%20how%20to%20configure%20the%20EB%3F%20Also%2C%20do%20I%20need%20to%20first%20set%20the%20working%20parameters%20using%20the%20registers%2C%20and%20then%20send%20and%20receive%20data%3F%20How%20should%20I%20send%20and%20receive%20data%3F%20I%20have%20read%20the%20official%20GD3162%20sample%20code%2C%20but%20I%20don't%20understand%20how%20to%20use%20the%20daisy%20chain%20method%20to%20enable%20the%20MCU%20to%20communicate%20with%20the%206%20driving%20peripherals.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2338225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20GD3162%20Daisy%20Chain%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2338225%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EDear%20Q%3CSPAN%3Eian%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CDIV%3Eall%20six%20GD3162%20devices%20share%20the%20same%20MOSI%20%2F%20MISO%20%2F%20SCLK%20%2F%20CSB.%20The%20devices%20are%20connected%20in%20series%2C%20forming%20one%20long%20shift%20register.%26nbsp%3B%3CSPAN%3EEach%20GD3162%20requires%20a%20%3C%2FSPAN%3E24%E2%80%91bit%20frame.%20Please%20refer%20to%20the%20section%2012.%20in%20the%20GD3162%20full%20datasheet%20for%20the%20SPI%20interface%20description.%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot_1.png%22%20style%3D%22width%3A%20457px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot_1.png%22%20style%3D%22width%3A%20457px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F380166i1F148317145E39AC%2Fimage-dimensions%2F457x83%3Fv%3Dv2%22%20width%3D%22457%22%20height%3D%2283%22%20role%3D%22button%22%20title%3D%22Screenshot_1.png%22%20alt%3D%22Screenshot_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3EPlease%20download%20the%20full%20GD3162%20datasheet%20from%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fproducts%2FGD3162%3Fticket%3DST-8775-oubUc-NwaKx7a5HvKdKjIcWFsXo-nxp%23myDocument%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGD3162%20product%20page%3C%2FA%3E%2C%20under%20the%20Secure%20section.%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot_2.png%22%20style%3D%22width%3A%20430px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot_2.png%22%20style%3D%22width%3A%20430px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F380168i7CEBBA6A743E8E2C%2Fimage-dimensions%2F430x233%3Fv%3Dv2%22%20width%3D%22430%22%20height%3D%22233%22%20role%3D%22button%22%20title%3D%22Screenshot_2.png%22%20alt%3D%22Screenshot_2.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FDIV%3E%0A%3CDIV%3EIn%20the%20Figure%2043.%20is%20shown%20SPI%20timing%2C%20from%20which%20required%20SPI%20mode%20can%20be%20deduced.%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CDIV%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22JozefKozon_0-1774339042724.png%22%20style%3D%22width%3A%20337px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22JozefKozon_0-1774339042724.png%22%20style%3D%22width%3A%20337px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F380169iCDBF0C6E12C6B111%2Fimage-dimensions%2F337x194%3Fv%3Dv2%22%20width%3D%22337%22%20height%3D%22194%22%20role%3D%22button%22%20title%3D%22JozefKozon_0-1774339042724.png%22%20alt%3D%22JozefKozon_0-1774339042724.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CDIV%20id%3D%22tinyMceEditorJozefKozon_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CTABLE%20class%3D%22wikitable%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTH%20width%3D%2290.8681px%22%20height%3D%2275px%22%3ESPI%20mode%3C%2FTH%3E%0A%3CTH%20width%3D%22115.66px%22%20height%3D%2275px%22%3EClock%20polarity%3CBR%20%2F%3E(CPOL)%3C%2FTH%3E%0A%3CTH%20width%3D%22104.618px%22%20height%3D%2275px%22%3EClock%20phase%3CBR%20%2F%3E(CPHA)%3C%2FTH%3E%0A%3CTH%20width%3D%22287.674px%22%20height%3D%2275px%22%3EData%20is%20shifted%20out%20on%3C%2FTH%3E%0A%3CTH%20width%3D%22148.75px%22%20height%3D%2275px%22%3EData%20is%20sampled%20on%3C%2FTH%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2290.8681px%22%20height%3D%2225px%22%3E0%3C%2FTD%3E%0A%3CTD%20width%3D%22115.66px%22%20height%3D%2225px%22%3E0%3C%2FTD%3E%0A%3CTD%20width%3D%22104.618px%22%20height%3D%2225px%22%3E0%3C%2FTD%3E%0A%3CTD%20width%3D%22287.674px%22%20height%3D%2225px%22%3Efalling%20SCLK%2C%20and%20when%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ESS%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eactivates%3C%2FTD%3E%0A%3CTD%20width%3D%22148.75px%22%20height%3D%2225px%22%3Erising%20SCLK%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2290.8681px%22%20height%3D%2225px%22%3E1%3C%2FTD%3E%0A%3CTD%20width%3D%22115.66px%22%20height%3D%2225px%22%3E0%3C%2FTD%3E%0A%3CTD%20width%3D%22104.618px%22%20height%3D%2225px%22%3E1%3C%2FTD%3E%0A%3CTD%20width%3D%22287.674px%22%20height%3D%2225px%22%3Erising%20SCLK%3C%2FTD%3E%0A%3CTD%20width%3D%22148.75px%22%20height%3D%2225px%22%3Efalling%20SCLK%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2290.8681px%22%20height%3D%2225px%22%3E2%3C%2FTD%3E%0A%3CTD%20width%3D%22115.66px%22%20height%3D%2225px%22%3E1%3C%2FTD%3E%0A%3CTD%20width%3D%22104.618px%22%20height%3D%2225px%22%3E0%3C%2FTD%3E%0A%3CTD%20width%3D%22287.674px%22%20height%3D%2225px%22%3Erising%20SCLK%2C%20and%20when%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3ESS%3C%2FSPAN%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eactivates%3C%2FTD%3E%0A%3CTD%20width%3D%22148.75px%22%20height%3D%2225px%22%3Efalling%20SCLK%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%2290.8681px%22%20height%3D%2225px%22%3E3%3C%2FTD%3E%0A%3CTD%20width%3D%22115.66px%22%20height%3D%2225px%22%3E1%3C%2FTD%3E%0A%3CTD%20width%3D%22104.618px%22%20height%3D%2225px%22%3E1%3C%2FTD%3E%0A%3CTD%20width%3D%22287.674px%22%20height%3D%2225px%22%3Efalling%20SCLK%3C%2FTD%3E%0A%3CTD%20width%3D%22148.75px%22%20height%3D%2225px%22%3Erising%20SCLK%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3EFigure%2047.%20shows%20Daisy%20chain%20data%20transmission.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20Table%2034.%20are%20listed%20SPI%20registers.%26nbsp%3B%3C%2FP%3E%0A%3CDIV%3E%0A%3CP%3EDo%20I%20need%20to%20configure%20registers%20first%3F%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%230000FF%22%3E%5BA%5D%20Yes.%20All%20GD3162%20devices%20must%20receive%20their%20configuration%20via%20SPI%20before%20entering%20normal%20PWM%20operation.%3C%2FFONT%3E%3CBR%20%2F%3E%3CFONT%20color%3D%22%230000FF%22%3EIf%20some%20devices%20need%20different%20settings%2C%20write%20to%20all%20first%2C%20then%20overwrite%20the%20ones%20that%20differ.%20Add%20100us%20delay%20after%20each%20register%20write.%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CDIV%3EWith%20Best%20Regards%2C%3C%2FDIV%3E%0A%3CDIV%3EJozef%3C%2FDIV%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E