Part Number: MSP430F413
Tool/software: Code Composer Studio
error #20: identifier "DCOCTL" is undefined
error #20: identifier "BCSCTL1" is undefined
Now I want to executing this source code on MSP430F413 but the errors occurred.
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.
Part Number: MSP430F413
Tool/software: Code Composer Studio
error #20: identifier "DCOCTL" is undefined
error #20: identifier "BCSCTL1" is undefined
Now I want to executing this source code on MSP430F413 but the errors occurred.
Hello G1,
This is usually an issue with including the msp430.h headers correctly or including/linking in the project settings.
In code composer studio, you can navigate to the resource explorer under the "View" menu and you should be able to directly import example projects from there. This is the most basic example that toggles a GPIO: http://dev.ti.com/tirex/explore/node?node=AAPIwPAtGIfIgDPICzIteA__IOGqZri__LATEST
Let me know if you have trouble running the MSP430F413 examples.
Thanks,
JD
DCOCTL and BCSCTL1 don't exist on the F4 series.
As far as I know they only exist on the F2 series, which suggests that the code you're using was written for an F2 device. They're used for setting the (DCO) clock speed.
The simplest remedy is to just remove the code lines that reference them. Per F4 User Guide (SLAU056L) Sec 5.2, that should run your code at roughly 1MHz.
Once you do this, you may (or may not) find more, less obvious, differences. That's where the Examples suite JD pointed out will really help.
**Attention** This is a public forum