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.
in several CLB examples i see this line
SysCtl_enablePeripheral((SysCtl_PeripheralPCLOCKCR)0x0011);
It calls SysCtl_enablePeripheral with a value not defined in the SysCtl_PeripheralPCLOCKCR Enum.
As far as i can see this results in a write to non existing part in memory!
What is it?
Martin,
Thanks for reporting it. Will forward your query to the concerned person to take a look and respond.
Best Regards
Siddharth
Hi Martin,
Are you running into any issues with running the CLB examples on F2837xD? I believe the 0x0011 corresponds to CLB1 on other devices than F2837xD, since on F2837xD, the CLB1 clock is linked to EPWM1. You can verify this by looking at the sysctl.h file for another C2000 device, like F28004x or F28002x. On those, the CLB1 clock (and all other CLB tiles) have independent clock configuration
Can you try running this example with that line removed? I believe it serves no purpose
Regards,
Peter
I already removed the line at it apparently makes no difference.
Also according to the debugger the written value it written in void, so no effect of this either.
This also why I am surprised to see it in example code, I assume the example code is there to help me learn the workings of this MCU, meaning it is not sufficient that the compiler understand the code I have too.
There are several redundant lines in this example, that could be removed for clarity. But this line in particular, stands out, as it is not only redundant, being an ugly hack (overriding enum values set) it really stands out, making me as learner dig into what it does as i was thinking "it must have a special meaning since they went to the lengths of ugly hacks". Just to discover I wasted my time on a meaningless thing.
So yes I can confirm as for the compiler and running the example, it is of little to no importance.
but as for the human learner it is like having someone standing in the classroom, yelling nonsense.
Hi Martin,
Thanks for your comments, I will definitely file this bug to get it fixed for our next C2000Ware release. I apologize for the confusion, the way the CLB works is unique on the F2837xD device as opposed to other devices, so I believe the writer of this example might have overlooked that aspect when porting over this example. Nonetheless, if you have any other questions, please feel free to reach out
Regards,
Peter