Example MPC5777C-eTPU_GPIO_test GHS714

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

Example MPC5777C-eTPU_GPIO_test GHS714

Example MPC5777C-eTPU_GPIO_test GHS714

********************************************************************************
* Detailed Description:
* A simple example configures eTPU engine B channels 0/1 for GPO/GPI. It is
* needed to connect these pins by wire. Output wave is generated by eTPU GPIO
* output function and inputs are read by fs_etpu_gpio_input_immed function
* latching just current pin state. Pin history is displayed in ISR.
*
* Note: It is needed to configure IGF module, otherwise inputs does not pass
* to eTPU module.
*
* ------------------------------------------------------------------------------
* Test HW:         MPC5777C-512DS Rev.A + MPC57xx MOTHER BOARD Rev.C
* MCU:             PPC5777CMM03 2N45H CTZZS1521A
* Fsys:            PLL1 = core_clk = 264MHz, PLL0 = 192MHz
* Debugger:        Lauterbach Trace32
* Target:          internal_FLASH
* Terminal:        19200-8-no parity-1 stop bit-no flow control on eSCI_A
* EVB connection:  ETPUB0 (PortR P25-1) --> ETPUB1 (PortR P25-0) by wire
*
********************************************************************************

Tags (2)
Attachments
Comments

Hello David,

As I know, the input of ETPU channel can be connected from the SDADC valid data flag output or the external pad, we use the SIU_SDETPUA, SIU_SDETPUB, SIU_SDETPUC to choose the connection .You can see the below image:

SDADC_ETPU.png

- I use ETPUA channel 9:

      + In the case 1, ETPUA_9 is connected to the external pad, the pinstate returned by fs_etpu_gpio_pin_history is correct as expected.

      + In the case 2,  ETPUA_9 is connected to the SDADC1 data valid flag output, the pinstate returned by fs_etpu_gpio_pin_history always be 0 even though the SDADC1 Conversion Data Valid Event is enabled(CDVEE bit of SDADC_RSER is 1) and Converted Data Valid Flag is 1(CDVF bit of SDADC_SFR is 1). This is wrong. I don't know why.

- The difference between these 2 cases is just SIU_SDETPUA configuraion.

Do you know why?

Regards,

Tam

Sorry, the ETPU channel is ETPUA_15

I tried with 2 cases:

- The ETPUA_15 channel with SDADC2

- The ETPUA_9 channel with SDADC1.

The pinstate always be 0.

Hi, please create new thread here on the community space or new case according to following procedure:
https://community.nxp.com/docs/DOC-329745

%3CLINGO-SUB%20id%3D%22lingo-sub-1110105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EExample%20MPC5777C-eTPU_GPIO_test%20GHS714%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20A%20simple%20example%20configures%20eTPU%20engine%20B%20channels%200%2F1%20for%20GPO%2FGPI.%20It%20is%3CBR%20%2F%3E*%20needed%20to%20connect%20these%20pins%20by%20wire.%20Output%20wave%20is%20generated%20by%20eTPU%20GPIO%3CBR%20%2F%3E*%20output%20function%20and%20inputs%20are%20read%20by%20fs_etpu_gpio_input_immed%20function%3CBR%20%2F%3E*%20latching%20just%20current%20pin%20state.%20Pin%20history%20is%20displayed%20in%20ISR.%3CBR%20%2F%3E*%20%3CBR%20%2F%3E*%20Note%3A%20It%20is%20needed%20to%20configure%20IGF%20module%2C%20otherwise%20inputs%20does%20not%20pass%3CBR%20%2F%3E*%20to%20eTPU%20module.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC5777C-512DS%20Rev.A%20%2B%20MPC57xx%20MOTHER%20BOARD%20Rev.C%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5777CMM03%202N45H%20CTZZS1521A%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL1%20%3D%20core_clk%20%3D%20264MHz%2C%20PLL0%20%3D%20192MHz%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%3CBR%20%2F%3E*%20Terminal%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2019200-8-no%20parity-1%20stop%20bit-no%20flow%20control%20on%20eSCI_A%20%3CBR%20%2F%3E*%20EVB%20connection%3A%26nbsp%3B%20ETPUB0%20(PortR%20P25-1)%20--%26gt%3B%20ETPUB1%20(PortR%20P25-0)%20by%20wire%3CBR%20%2F%3E*%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1110105%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E********************************************************************************%3CBR%20%2F%3E*%20Detailed%20Description%3A%3CBR%20%2F%3E*%20A%20simple%20example%20configures%20eTPU%20engine%20B%20channels%200%2F1%20for%20GPO%2FGPI.%20It%20is%3CBR%20%2F%3E*%20needed%20to%20connect%20these%20pins%20by%20wire.%20Output%20wave%20is%20generated%20by%20eTPU%20GPIO%3CBR%20%2F%3E*%20output%20function%20and%20inputs%20are%20read%20by%20fs_etpu_gpio_input_immed%20function%3CBR%20%2F%3E*%20latching%20just%20current%20pin%20state.%20Pin%20history%20is%20displayed%20in%20ISR.%3CBR%20%2F%3E*%20%3CBR%20%2F%3E*%20Note%3A%20It%20is%20needed%20to%20configure%20IGF%20module%2C%20otherwise%20inputs%20does%20not%20pass%3CBR%20%2F%3E*%20to%20eTPU%20module.%3CBR%20%2F%3E*%3CBR%20%2F%3E*%20------------------------------------------------------------------------------%3CBR%20%2F%3E*%20Test%20HW%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20MPC5777C-512DS%20Rev.A%20%2B%20MPC57xx%20MOTHER%20BOARD%20Rev.C%3CBR%20%2F%3E*%20MCU%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PPC5777CMM03%202N45H%20CTZZS1521A%3CBR%20%2F%3E*%20Fsys%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PLL1%20%3D%20core_clk%20%3D%20264MHz%2C%20PLL0%20%3D%20192MHz%3CBR%20%2F%3E*%20Debugger%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Lauterbach%20Trace32%3CBR%20%2F%3E*%20Target%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20internal_FLASH%3CBR%20%2F%3E*%20Terminal%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2019200-8-no%20parity-1%20stop%20bit-no%20flow%20control%20on%20eSCI_A%20%3CBR%20%2F%3E*%20EVB%20connection%3A%26nbsp%3B%20ETPUB0%20(PortR%20P25-1)%20--%26gt%3B%20ETPUB1%20(PortR%20P25-0)%20by%20wire%3CBR%20%2F%3E*%3CBR%20%2F%3E********************************************************************************%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1110109%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5777C-eTPU_GPIO_test%20GHS714%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110109%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20please%20create%20new%20thread%20here%20on%20the%20community%20space%20or%20new%20case%20according%20to%20following%20procedure%3A%3CBR%20%2F%3E%3CA%20class%3D%22jive-link-wiki-small%22%20data-containerid%3D%222001%22%20data-containertype%3D%2214%22%20data-objectid%3D%22329745%22%20data-objecttype%3D%22102%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-329745%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-329745%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1110108%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5777C-eTPU_GPIO_test%20GHS714%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110108%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20tried%20with%202%20cases%3A%3C%2FP%3E%3CP%3E-%20The%20ETPUA_15%20channel%20with%20SDADC2%3C%2FP%3E%3CP%3E-%20The%20ETPUA_9%20channel%20with%20SDADC1.%3C%2FP%3E%3CP%3EThe%20pinstate%20always%20be%200.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1110107%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5777C-eTPU_GPIO_test%20GHS714%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110107%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ESorry%2C%20the%20ETPU%20channel%20is%20ETPUA_15%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1110106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Example%20MPC5777C-eTPU_GPIO_test%20GHS714%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1110106%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20David%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EAs%20I%20know%2C%20the%20input%20of%20ETPU%20channel%20can%20be%20connected%20from%20the%20SDADC%20valid%20data%20flag%20output%20or%20the%20external%20pad%2C%20we%20use%26nbsp%3Bthe%20SIU_SDETPUA%2C%20%3CSPAN%3ESIU_%3C%2FSPAN%3E%3CSPAN%3ESDETPUB%2C%26nbsp%3BSIU_SDETPUC%20to%20choose%20the%20connection%20.%3C%2FSPAN%3EYou%20can%20see%20the%20below%20image%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22SDADC_ETPU.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22SDADC_ETPU.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F77542iADABBAD9F49042B8%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22SDADC_ETPU.png%22%20alt%3D%22SDADC_ETPU.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E-%20I%26nbsp%3Buse%20ETPUA%20channel%209%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2B%20In%20the%20case%201%2C%20ETPUA_9%20is%20connected%20to%20the%20external%20pad%2C%20the%26nbsp%3B%3CSPAN%3Epinstate%20returned%20by%26nbsp%3Bfs_etpu_gpio_pin_history%20is%20correct%20as%20expected.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2B%20In%20the%20case%202%2C%20%3CSPAN%3E%26nbsp%3BETPUA_9%20is%20connected%20to%20the%20SDADC1%20data%20valid%20flag%20output%2C%20t%3C%2FSPAN%3Ehe%20pinstate%20returned%20by%26nbsp%3Bfs_etpu_gpio_pin_history%20always%20be%200%20even%20though%20the%20SDADC1%20Conversion%20Data%20Valid%20Event%20is%20enabled(CDVEE%20bit%20of%20SDADC_RSER%20is%201)%20and%20Converted%20Data%20Valid%20Flag%20is%201(CDVF%20bit%20of%20SDADC_SFR%20is%201).%20This%20is%20wrong.%20I%20don't%20know%20why.%3C%2FP%3E%3CP%3E-%20The%20difference%20between%20these%202%20cases%20is%20just%20SIU_SDETPUA%20configuraion.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDo%20you%20know%20why%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3ETam%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎10-17-2017 11:16 PM
Updated by: