Is it possible to edit the NXP MBDT for S32K1xxx MCUs

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Is it possible to edit the NXP MBDT for S32K1xxx MCUs

1,188 次查看
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 项奖励
3 回复数

1,123 次查看
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 项奖励

1,096 次查看
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 项奖励

1,163 次查看
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 项奖励