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.

CCS/MSP-EXP432E401Y: Configure a GPIO

Part Number: MSP-EXP432E401Y
Other Parts Discussed in Thread: MSP430FR2433

Tool/software: Code Composer Studio

Hi. I have been striving to put a single GPIO as output I don't know how to make it.. I run the blink example in the driverlib and I did but I want to go deeper and learn to configure the MCU from myself and not using a library that help me to avoid hard staffs but it avoids me to learn. 

PS: I run the blink code and debug it but it doesn't show the whole scenario. What I mean it doesn't enter to the function where it carries out the bit-banding. I run the code in paper and I got the register which enables RCGCGPIO N port is 0x43FCC130 and the manual it shows is an area for bit-banding operations. I have been reading bit-banding and what I learned it's a method to modifiy a single bit instead of the entire array or register but it seems that I don't get it completely since I cannot configure a GPIO as output

  • Reading on the website and ARM information I understood what it's bit-banding and why the outcome is the bit-banding alias region. But I still cannot figure out how the mathematical procedure of the driverlib. I assumed that it's optimized since it uses bitwise operation to perform mathematical procedure, such as adding and multiplication but I cannot figure out where is the bit_word_offset, bit_word_addr, byte_offset, bit_number

    this is from DS which explains bit-banding operation

  • Hello Gomez,

    For really powerful and complex ARM MCUs and processors like MSP432E4, it's very common to rely on the abstracted software libraries provided to configure and run the devices.  This is where Driverlib and TI Drivers come in, they have many layers to present an easy to use API structure for customers to develop with, instead of having to get down to the bit access level.   

    If you are interested in learning at the bit and register access level, I'd recommend looking at MSP432P401R if you want ARM or something like MSP430FR2433 for an easy to use MSP430 MCU as each of these have register level software examples that sound closer to what you are wanting to work with.

    MSP432P401R Register level examples

    MSP430FR2433 Register Level Examples

    Thanks,

    JD

      

  • At the end, I could understand how bit banding works and make a led to blink a period of time without using any library. It was something hard to understand at the beginning but with the ARM application note which explains very well how bit-banding works and how to put it on C code it helped to get the implementation. Obviously I studied several times the driverlib to only configure one GPIO and it was difficult because all the process is optimized (I assumed) which a simple operation, such as set a bit in a register or something else, I had to use the debugger to see what it was the purpose.

    Now that I could finish the simplest code that every person do at the first time on a MCU, I'll study how to configure the UART on the MSP432E4.

    PS: yes, you right , I should begin with a MCU much easier as MSP432P401R which has several examples very well explains and there are more information on the web to how solve some problems. I made a noob mistake when I asked on the forum they recommended to use MSP432P401R  or  MSP432E4, but I didn't look into what it was the difference between them.