AnsweredAssumed Answered

eTPU engine 2 on MPC5746

Question asked by Jyothsna Rajan on Dec 11, 2018
Latest reply on Dec 12, 2018 by Jyothsna Rajan


I intend to use some channels on eTPU engine 2 on MPC5746. I downloaded the eTPU function sets from NXP website. But all of them use only engine1.


The functions in eTPU_util.c are written such that they can be adapted to run on eTPU engine 1 or engine 2. I tried to use the same examples for eTPU engine 2 by changing the channel numbers on the host side functions and configuring SIUL2 accordingly, but without success.


I have some questions:

1. channel numbers for eTPU engine 2 channels:  Should I use numbers from 32 to 63  or  64 to 95?

each eTPU engine has 32 channels, numbered 0 to 31, so I expect eTPUB channel number to start from 32. But per this macro in etpu_util.h, 

/***************************************************************************//*!* @brief   Channel number expressed by (engine, channel)* @note    All channel numbers for both eTPUs are absolute.*          eTPU_A has channels 0-31 and eTPU_B has channels 64-95.*******************************************************************************/#define FS_ETPU_ENGINE_CHANNEL(x,y) (((x)-1)*64 + y)
eTPUB channel number starts from 64. Why?

2. engine memory size:

In function    uint32_t fs_etpu2_init( struct etpu_config_t p_etpu_config, uint32_t engine_mem_size);

what is engine_mem_size?

3. Do we always have to use and initialize eTPU engine 1? Can my design use only eTPU engine 2?


A simple example that uses engine 2 would be helpful. Does anyone have one to share?


Thank you.