I am trying to change the pinmux file for my TMDSICE3359 development board to add in McASP functionality (receive only and not for audio). I've read the documentation for the PDK I am using (currently pdk_am335x_1_0_16) especially this part http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_board.html#am335x-am437x which was referred to in a previous forum thread. After searching through the makefiles and source code within the PDK I can tell where to put my generated am335x_pinmux_data.c and am335x_pinmux.h files so that they get compiled when building the board library using
gmake board_lib
I also know to change the pinmux configuration table pointer in icev2AM335x_pinmux.c to reference my new pinmux, as follows:
int32_t PINMUXModuleConfig(chipdbModuleID_t moduleId, uint32_t instNum, void* pParam1) { pinmuxModuleCfg_t* pModuleData = NULL; pinmuxPerCfg_t* pInstanceData = NULL; volatile pinmuxBoardCfg_t* pPinmuxData = NULL; uint32_t ctrlModBase = CHIPDBBaseAddress(CHIPDB_MOD_ID_CONTROL_MODULE, 0); int32_t status = E_FAIL; uint32_t index = 0; /* Get module Data */ // pPinmuxData = gIceV2PinmuxData; pPinmuxData = gAM335xPinmuxData;
where gAM335xPinmuxData is the pointer to the new table.
I have used the template icev2_config.pinmux file from folder C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\tools\pinmux_config\am335x with the pinmux tool and added in the McASP pin configuration that I need. From there I generate the .c and .h files and put them where they are needed as above then rebuild the board library. In CCS I have a project derived from rtos_template_app_am335x_a8 which happily flashes the RGB LED in the corner of the board. I recompile the project using the new pinmux configuration and it builds OK. Then I go to debug the project but I get
Guessing that I've got the pinmux wrong somehow, I revert the pinmux settings back to their default from the template in the pinmux tool and regenerate the C and H files. I rebuild the board library and then the application code. The result is the same, I get the ADP_Stopped exception. This always happens when trying to step past the Board_init() function. If I change the pointer to the configuration table back to its original value the code works and the LED flashes.
So, it seems like the pinmux template within the PDK is wrong. Following on from that assumption, I do a diff between the generated pinmux C file and the original within the PDK (C:\ti\pdk_am335x_1_0_16\packages\ti\starterware\board\am335x\am335x_icev2_pinmux_data.c). To my surprise they are quite different. I've attached the diff report for you to see.diff_report.htm
My questions are these:
- Am I doing something wrong?
- Do you have the pinmux file for the development board that will generate the correct C code?
- Is there a way of being able to step into the Board_init() function by building debug board libraries instead of release versions so that I can see where the exception is occurring at a more useful level?