This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2800137: where can I download 2800137 sample code that using register bitfield mode

Part Number: TMS320F2800137
Other Parts Discussed in Thread: C2000WARE

I found there are some bitfield mode sample code under \C2000Ware_x_xx_xx_xx\device_support\f280013x\examples.

But I can't find CAN sample code in bitfield mode. Where can I download CAN sample code that use bitfield mode?

Why don't driverlib use bitfield for register operating? Is there any issue about operating register by bitfield mode?

It would be more convenient for the user if driverlib use bitfield mode. User can also develop application by the function that provide by driverlib.

Thanks for TI support team.

  • Hi,

    We use the HWREG macro based approach for driverlib implementation as they were more easier to use while providing driverlib functions as compared to bitfield struct format. Bitfields approach is suitable when you are directly writing to the registers, as opposed to using the driverlib functions. Also, there were few MISRA-C related issues associated with bitfields approach.

    Were you facing any specific issues while using the driverlib implementation? We recommend the usage of driverlib functions as it provides register level abstraction and also ensure easy migration across devices in the C2000 family

    Regards,

    Veena

  • Hi Veena

    I work on application code porting  from dsp28035 to dsp2800137. Some App function referenced to 28035 sample code was implemented by bitfield mode. When I'm trying to modify our App to driverlib mode, Some App function is difficult to change. So I was curious about why driverlib function don't use register structure. Driverlib could also use register structure and provide friendly function to user. But driverlib use HWREG macro based rather than register structure. I hope to exactly know if bitfield mode has any risk for register setting so I could decide should I modify my App function that implemented by bitfield mode.

    Thanks for your help

  • There are no risks per se. You could continue using the bitfield approach. This is primarily intended to support direct register writes. In case the hardware IP changes, you may need to change the code accordingly.