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: MSP432P401R
Tool/software: TI C/C++ Compiler
Hello everybody:
I have a code question. It may be a silly question but I am a beginner so please have patience.
I have been working with the MSP430F5529 Launchpad for a couple of years and just purchased my new MSP432.
I noticed that the example code is a little bit different; for example to configure a port, instead of P1DIR |= BIT0;, it has P1->DIR |= BIT0;
If I enter as the first example, it will work fine.
I was just wondering if there is any benefit of the second example over the first example.
Is it faster or easier for the processor? or, Can I just continue to write the code as I did with the '5529?
Would really appreciate any comment.
Thanks!
Ralf
Rafael,
Yes, they are basically the same. The P1->DIR format follows the CMSIS standard from ARM, while the P1DIR |= is the 'classic' format used in MSP430. When you download the sdk you can see that there are two header files associated with the device and one of those has '_classic' in the name.
C:\ti\simplelink_msp432p4_sdk_2_10_00_14\source\ti\devices\msp432p4xx\inc
You will see that the newer devices (P401v,y,P411,P4x11) do not have classic alternatives.
Regards,
Chris
Thank you very much Chris.
This is exactly what I was looking for.
Best regards.
Ralf
**Attention** This is a public forum