SPRAD24 august 2023 AM2631 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM263P4 , AM263P4-Q1
C28 shares similar control peripherals as AM263x. But, the architecture and connectivity peripherals are completely different. Generally, programs related to control peripherals can be migrated with little or none modification while those related to CPU, memory management, and connectivity peripherals must be updated for details in Technical Reference Manual of AM263x.
As well know, direct operation on registers has been widely used in C28 programs in the past. The movement from register operations to API calls happened in recent years. The change from register operation to API calls simplifies the adoption of more complex MCUs. But, it takes effort to migrate from register user to API user. The effort is inevitable for either C28 and AM263x. Once the effort is made, it is not difficult to work with AM263x control subsystem as the concept from modules, like ADC and PWM, are very similar. Some examples on the similarity of control APIs are given in Table 4-2. And also, the powerful Sysconfig is available in AM263x SDK. It offers intuitive user interface for system configuration. End users are enabled to directly apply their ideas on control peripheral into configuration without worrying about API details. The APIs widely used in control loop have been given as part of the framework and discussed in Section 3.
API Function | AM263x Definition | C28 Definition |
---|---|---|
Get ADC Result | static inline uint16_t ADC_readResult (uint32_t resultBase, ADC_SOCNumber socNumber) | static inline uint16_t ADC_readResult (uint32_t resultBase, ADC_SOCNumber socNumber) |
Set PWM Duty Cycle | static inline void EPWM_setCounterCompareValue (uint32_t base, EPWM_CounterCompareModule compModule, uint16_t compCount) | static inline void EPWM_setCounterCompareValue (uint32_t base, EPWM_CounterCompareModule compModule, uint16_t compCount) |
Also, despite the similarities, there are some difference in SDK and some implementations with similar names. As shown in Section 4.1, the SDK structure of AM263x is very different from the SDK of C28. Although they share similar control peripherals and APIs are similar, it is still necessary to understand the different in SDK structure so that detail can be easily found during development. And, for some features like XBAR, both C28 and AM263x have XBAR synchronizing operation between modules but XBAR in AM263x is much more powerful than XBAR in C28. It comes with a challenge that it must be sufficiently understood and properly configured. XBAR program from C28 cannot be directly applied into AM263x projects.