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: CCS/MSP430FR5969: CCS/MSP430FR5972 + ADC + Timers

Other Parts Discussed in Thread: MSP430FR5972, MSP430FR5969

Tool/software: Code Composer Studio

Hi all!

Unfortunately, it is difficult for me to switch from Atmel to MSP430FR5972 ...
I'm asking for help

I need to solve this problem:
1) The ADC should "round-robin" the multiplexer by 1--2-3-4 ...- 8 inputs and, bypassing the processor, immediately use direct memory access. Write values ​​from each channel to separate memory locations. I need 12 bits.
How to program the ADC to this mode of operation?
How to make records bypassing the processor immediately in memory? that is: without calling "interruption" on the readiness of the data in the ADC, immediately write through the controller of direct access to the memory (DMA controller)? Is this possible?

Timers should be powered from an internal clock source, the processor clock speed = 8MHz.

2) The first timer is 16 bits, triggered by an interrupt "overflow".
in interrupt processing is my program. Triggering 150 times per second, while no external pins of the chip can not be touched.

3) Second timer 16 bits, triggered by interrupt "overflow".
in interrupt processing is my program. Trigger every 0.5 sec, but do not touch any external pins of the chip. Can I use the "real-time timer" (RTC) as a timer to work on the built-in clock generator (8MHz)?

4) The third timer is 16 bits, it does not cause any interruptions. Triggering 30000 times per second, It simply works from the minimum to the maximum of the values ​​forming the PWM output (one pin of the chip). The values ​​of the counter "Timer 3" I myself put out of my program "Timer 1", writing data directly to the counter "Timer 3.

5) to output information from my program, I will use HD44780 LCS, so I need to select the ports of the MCP430 so that I do not interfere with the operation of the ADC and Timers. (See above).

I have a test card for the "initial set" based on MSP430FR5969, I want to check it out first how this will work.
The examples I saw do not give me the opportunity to see the whole picture of the whole work. :(
I ask for your help with the initial configuration of the MCP430 for this my task.


  • Hi Soroka,

    Please refer to MSP430FR5972 code examples.

    Regards,

    Ling

  • Thank you
    Question: The RTC timer can be powered from an internal clock source, like Timer0 for example?
    Or the RTC timer can only work from external quartz 32768KHz?

  • I looked through the code C examples and did not find there an answer to my first question:

    1) The ADC should "round"(turret) the multiplexer by 1--2-3-4 ...- 8 inputs and, bypassing the processor, immediately use direct memory access. Write values ​​from each channel to separate memory locations. I need 12 bits.
    How to program the ADC to this mode of operation?

    I know how to make the processor interrupt each time in fact "the readiness of the ADC data", read the data and transfer it to the memory location.
    But in the datasheet I read that the ADC can independently, cyclically, write its results into memory, without causing the processor to work this way.

    Am I mistaken?
  • Alexander Soroka said:

    Thank you
    Question: The RTC timer can be powered from an internal clock source, like Timer0 for example?
    Or the RTC timer can only work from external quartz 32768KHz?

  • Alexander Soroka said:
    I looked through the code C examples and did not find there an answer to my first question:

    1) The ADC should "round"(turret) the multiplexer by 1--2-3-4 ...- 8 inputs and, bypassing the processor, immediately use direct memory access. Write values ​​from each channel to separate memory locations. I need 12 bits.
    How to program the ADC to this mode of operation?

    I know how to make the processor interrupt each time in fact "the readiness of the ADC data", read the data and transfer it to the memory location.
    But in the datasheet I read that the ADC can independently, cyclically, write its results into memory, without causing the processor to work this way.

    Am I mistaken?

     

  • DCO - can be source for RTC timer ?

  • I read the description of MSP430 and feel stupid :-(

    I do not understand how many really timers in MSP430fr5969...

    in file "msp430fr5969.h" I'm see:

    Timer0_A3 - Timer0_A3 what does "_A3" mean?

    Timer0_B7 - what does "_B7" mean?

    Is it the same timer "Timer0" or two different ones?

    Timer1_A3 - what does "_A3" mean?

    Timer2_A2 - what does "_A2" mean?

    Timer3_A2 - what does "_A2" mean?

    In the functional diagram of Fig. 1-1, five (five) different timers are indicated:

    TA2 => Timer_A2 CC  - what does mean? "CC" ?

    TA3 => Timer_A5 CC

    TA0 => Timer_A3 CC

    TA1 => Timer_A3 CC 

    TA0 & TA1 is some one timer ???  what does mean?

    TB0 => Timer_B7 CC 

    ...I'm looking at examples and I do not understand why there are so many settings and how many REALLY there are timers that I can use separately from each other.

  • You may find it helpful to take an entry level class on mcu or to find someone local to you who has experience with the chip.

    You may learn faster that way.

  • There are two kind of general timers in the MSP430: Timer_A and Timer_B

    Timer_A is a 16-bit timer/counter with up to seven capture/compare registers. Timer_A can support
    multiple captures or compares, PWM outputs, and interval timing. Timer_A also has extensive interrupt
    capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the
    capture/compare registers.

    Timer_B is a 16-bit timer/counter with up to seven capture/compare registers. Timer_B can support
    multiple capture/compares, PWM outputs, and interval timing. Timer_B also has extensive interrupt
    capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the
    capture/compare registers.

    Timer_B is identical to Timer_A with the following exceptions:
    • The length of Timer_B is programmable to be 8, 10, 12, or 16 bits.
    • Timer_B TBxCCRn registers are double-buffered and can be grouped.
    • All Timer_B outputs can be put into a high-impedance state.
    • The SCCI bit function is not implemented in Timer_B.

    There might be several Timer_A and several Timer_B in one MSP430: TA0, TA1... TB0, TB1...

    Timer0_A3 means TA0 with 3CC; Timer0_B7 means TB0 with 7CC

    CC means capture/compare module
  • Ling Zhu2 - Thank you very much!
    now it became clear to me - I need to understand the structure of MSP430, it is quite different from Atmel.
    Thank you very much!
  • Hi Alexander,

    You are welcome~ Feel free to post your quesiton here.

    Regards,
    Ling
  • question about ADC:

    the documentation says that the conversion is 200kps, which means that up to 200000 times per second I can shoot 12bit results.

    This is true?
    I do not need so much :-)
    What frequency, for example, from SMCLK, should I submit to the ADC to receive, for example, 150ksps?

    how many cycles of the input frequency do you need an ADC for one complete conversion? 13? 14? 16?

    In manual: "...ADC... conversion mode selected is either sequence-of-channels or repeat-sequence-of-channels"

    Where can I see an example of this method ADC?

  • I found a wonderful nice lecture about ADC!
    here it is on the link - I recommend it to everyone!
    www.ece.uah.edu/.../cpe323msp430_adcdac.pdf

**Attention** This is a public forum