I recently downloaded a sample file for the C2000 F28379D from Texas Instruments and successfully viewed it (referred to as image1). I attempted to adapt this sample to work with the F28335 by changing all relevant blocks from F28379D to F28335. During this process, I encountered an error related to the initialization function ('InitFcn') of ADC Type 3-5 blocks within my model. Specifically, the error arises in two parts of my project:
- The first error occurs in the 'f28335_sixstep_controlBLDC/Hardware Init/Code Generation/Calculate ADC Offset /For Iterator Subsystem/ADC5' block with the callback string: validatePiccoloADC;
codertarget.registry.registerPiccoloADCBlocks(gcb);
The system reports: "Unrecognized field name 'ADCmodule2'."
- The second error is encountered in 'f28335_sixstep_controlBLDC/Current Control/Sensor Driver Blocks/Sensor Driver Blocks (codegen)/Current Measurement/ADC3' block, also with the callback string:
validatePiccoloADC;
codertarget.registry.registerPiccoloADCBlocks(gcb);
This time, the error message indicates an "Unrecognized field name 'ADCmodule'." image3
I aim to simulate this project with an F28335 MCU. Could anyone provide guidance on resolving these errors to successfully convert and run the simulation for the F28335?
Thank you for your assistance.
To port the code from one MCU to another, you will have to take into account two things regarding the hardware peripherals:
In your specific case, both are an issue:
You will have to adapt the simulink model too, not only the configuration of the blocks.