SPRAD20 March 2022 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
ADC samples are read by the following lines 1 to 8 for 3-phase current, resolver sin/cos, and DC bus voltage. The SDK API is wrapped into Macros in one file. Couple simple "Ctrl + left click" on the variable name will help find the location where is defined. Example are given in lines 9 and 10. ADC_readResult is to read ADC result and ADC_readPPBResult is to read ADC result after Post Processing Blocks. Details on Post Processing Blocks can be find in Technical Reference Manual.
To show an example on reading and plotting ADC in graph window, the log pointers are connected to 3-phase currents and log functions are called. Phase A current at no load is plotted into graph window by right clicking the gLog_CH[7] in expression window and selecting graph as shown in Figure 2-34. In this case, Phase A current is pointed to gLog_CH[7] as shown in the following list. It could be assigned to any log channel. To add gLog_CH into expression window, it is simply right clicking and adding to watch expression. More details can be found in CCS tutorial.
During bring up at low voltage like 12V, it is suggested to overwrite the DC bus voltage with voltage reading from power supply as error from TIDM-02009 is not negligible at 12V.