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.

Reg:Reading the hardware register

Other Parts Discussed in Thread: TM4C123GH6ZRB

Hi 

I am using TM4C123GH6ZRB micro controller .How to read the hard ware register like SYSPROP  etc.Is there any api provied by tiva ware or any other way to read the register value ?

Thanks & Regards

       Durga

  • Hi Durga. You can access all the registers present in your controller in the corresponding header file. In your case it is tm4c123gh6zrb.h. These headers are present in TivaWare/inc folder. Regards, Shashank
  • Hi,

        See, HWREG macro at \\inc\hw_types.h.

    -kel

  • Don't find either, earlier response to clearly provide your requested, "read the register value."  Thus suggest:

    ulTemp1 = HWREG(PWM0_BASE + PWM_O_ENABLE);

    ulTemp2 = HWREG(ADC0_BASE + ADC_O_SSFIFO0);

    ulTemp1 will hold the value w/in Register PWM_O_ENABLE while ulTemp2 receives, ADC_O_SSFIFO0.

    Usually these Registers are listed w/in several .h files w/in your project.  A search of the .h file of your targeted peripheral and even a broader IDE based, "search w/in project files" will provide detail on these & similarly related MCU Registers.