Is it possible to edit the NXP MBDT for S32K1xxx MCUs

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

Is it possible to edit the NXP MBDT for S32K1xxx MCUs

1,108 Views
geertvenken
Contributor I

The S32K1xxx MBD toolbox only contains support for MC3377xB devices.

Is it possible to add support for MC3377xC devices myself?

Is a manual or guide available  for editing this library?

 

thanks,

Geert

 

0 Kudos
3 Replies

1,043 Views
geertvenken
Contributor I

Hi Marius,

I followed the article from your reply above, to integrate the driver in a Model.  The driver is used in TPL mode so also two SPI's are configured in the model.

I have added a Matlab functionblock with an init function for the MC33771C driver.  But I noticed a problem during debugging:

- the Slave SPI is not receiving all bytes 

In the function BCC_MCU_TransferTpl  after the execution of LPSPI_DRV_MasterTransferBlocking, LSPI0->SR->REF=1 (Receive fifo has overflow)

And later the function BCC_CheckEchoFrame will return an error

Is this because this is all executed in the LPIT0_Ch0_IRQHandler?

I'm suspecting this interrupt as in the BCC_S32_Freemaster example this same code is executed in the main loop.

How can this be solved?  Is the driver using DMA for SPI transfers?  I already played around with the interrupt level of LPIT0, but without success.

Kind regards,

Geert

 

0 Kudos

1,016 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @geertvenken 

I've uploaded a model for the custom code on the MC33771 in the below article. Are you trying this one?

Indeed, all the code is executing inside the PIT0 Interrupt, so the priority of both SPI TX and RX have to be higher than the PIT0, while the RX interrupt also has to have higher priority than the TX.

https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-... 

Regards,

Marius

0 Kudos

1,083 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @geertvenken ,

We propose to add support for the MC33771C in S32K1 soon.

Until then, you can achieve such functionality using custom code as described in the following article https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

Hope this helps,

Marius

0 Kudos