Issue with TJA1145 SPI Control on S32K144W Board – CS Pin Mapping

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

Issue with TJA1145 SPI Control on S32K144W Board – CS Pin Mapping

868 Views
JYounKim
Contributor I

I am working with the S32K144W (LQFP-64) and the TJA1145ATK/FD CAN transceiver.
While trying to activate the TJA1145 via SPI, I noticed a possible hardware pin-mapping issue on the board design.

According to the schematics, the TJA1145 SCSN (chip select) pin is connected to PTC15, and the net is labeled as LPSPI_CS1.
However, PTC15 does not support any LPSPI PCS (chip-select) function in the S32K144W, and therefore cannot operate as a hardware CS for any LPSPI0 module.

Because of this, MCAL-based SPI communication cannot control the CS line and the TJA1145 cannot be initialized properly.

Before I redesign the PCB or move to a software-controlled GPIO CS workaround, I would like to confirm with NXP:

Is this indeed an incorrect CS pin assignment?

Is there any recommended approach to drive the TJA1145 on S32K14WEVB when the CS pin is connected to a non-PCS GPIO pin?

Any clarification would be greatly appreciated. Thank you.

0 Kudos
Reply
1 Reply

836 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, i can confirm your findings. LPSPI0 is used to control both SBC and TJA1145. Both CSs are connected to MCU pins not having LPSPI0 PCSx function, so will not be able to control it by HW. An option is to use software-controlled GPIO CS, as you wrote.

Another option for TJA1145 CS connected to PTC15 is to have
- no config for PTC15
- connect PTC15 to PTB0, PTB5 or PTE6 on arduino headers and use LPSPI0 PCS function on selected pads.

BR, Petr

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2247963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EIssue%20with%20TJA1145%20SPI%20Control%20on%20S32K144W%20Board%20%E2%80%93%20CS%20Pin%20Mapping%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2247963%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20working%20with%20the%20S32K144W%20(LQFP-64)%20and%20the%20TJA1145ATK%2FFD%20CAN%20transceiver.%3CBR%20%2F%3EWhile%20trying%20to%20activate%20the%20TJA1145%20via%20SPI%2C%20I%20noticed%20a%20possible%20hardware%20pin-mapping%20issue%20on%20the%20board%20design.%3C%2FP%3E%3CP%3EAccording%20to%20the%20schematics%2C%20the%20TJA1145%20SCSN%20(chip%20select)%20pin%20is%20connected%20to%20PTC15%2C%20and%20the%20net%20is%20labeled%20as%20LPSPI_CS1.%3CBR%20%2F%3EHowever%2C%20PTC15%20does%20not%20support%20any%20LPSPI%20PCS%20(chip-select)%20function%20in%20the%20S32K144W%2C%20and%20therefore%20cannot%20operate%20as%20a%20hardware%20CS%20for%20any%20LPSPI0%20module.%3C%2FP%3E%3CP%3EBecause%20of%20this%2C%20MCAL-based%20SPI%20communication%20cannot%20control%20the%20CS%20line%20and%20the%20TJA1145%20cannot%20be%20initialized%20properly.%3C%2FP%3E%3CP%3EBefore%20I%20redesign%20the%20PCB%20or%20move%20to%20a%20software-controlled%20GPIO%20CS%20workaround%2C%20I%20would%20like%20to%20confirm%20with%20NXP%3A%3C%2FP%3E%3CP%3EIs%20this%20indeed%20an%20incorrect%20CS%20pin%20assignment%3F%3C%2FP%3E%3CP%3EIs%20there%20any%20recommended%20approach%20to%20drive%20the%20TJA1145%20on%20S32K14WEVB%20when%20the%20CS%20pin%20is%20connected%20to%20a%20non-PCS%20GPIO%20pin%3F%3C%2FP%3E%3CP%3EAny%20clarification%20would%20be%20greatly%20appreciated.%20Thank%20you.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2248395%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Issue%20with%20TJA1145%20SPI%20Control%20on%20S32K144W%20Board%20%E2%80%93%20CS%20Pin%20Mapping%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2248395%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3Eyes%2C%20i%20can%20confirm%20your%20findings.%20LPSPI0%20is%20used%20to%20control%20both%20SBC%20and%20TJA1145.%20Both%20CSs%20are%20connected%20to%20MCU%20pins%20not%20having%20LPSPI0%20PCSx%20function%2C%20so%20will%20not%20be%20able%20to%20control%20it%20by%20HW.%20An%20option%20is%20to%20use%26nbsp%3B%3CSPAN%3Esoftware-controlled%20GPIO%20CS%2C%20as%20you%20wrote.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EAnother%20option%20for%20TJA1145%20CS%20connected%20to%20PTC15%20is%20to%20have%3CBR%20%2F%3E-%20no%20config%20for%20PTC15%3CBR%20%2F%3E-%20connect%20PTC15%20to%20PTB0%2C%20PTB5%20or%20PTE6%20on%20arduino%20headers%20and%20use%20LPSPI0%20PCS%20function%20on%20selected%20pads.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EBR%2C%20Petr%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E