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/MSP430F2013: Maximum IO Toggle Speed

Part Number: MSP430F2013
Other Parts Discussed in Thread: MSP430FG4618

Tool/software: Code Composer Studio

I use the MSP430FG4618 / F2013 Experimenter Board and don't know how to toggle the IO at a maximum speed of 16 MHz. The DCO is at 16 MHz but the output pin toggles only at a speed of 1.1 MHz. How is this possible and how can I toggle the IO at a speed of 16MHz?

  • If I remember right, writing value to F2xx port output (mov.b R15, &P1OUT) will take minimum 4 CPU cycles. If output just need to be toggled with constant frequency than Timer PWM output can be used (if I remember right) with maximum MCLK/2 frequency.

  • Ali,

    As DavidL recommends in this E2E post ( https://e2e.ti.com/support/microcontrollers/msp430/f/166/t/487396?MSP432-GPIO-Toggle-Rate ), you can output one of the clocks, SMCLK for example, to a GPIO in order to toggle the GPIO at the maximum DCO speed. If you need a high toggle frequency with more customization than just outputting the "clock" frequency then you can use the PWM output using a timer. 

    Best regards,

    Matt

  • Hello Matt,

    Thank you for your response. Indeed, I need more than just output the SMCLK to a GPIO. I want to generate a modulated signal using on-off keying. This is a type of signal used for digital wireless communication where a data signal, e.g., 100 kHz is modulated by a data signal, e.g., 1.6 MHz. I thought if I could find a CPU instruction that uses only 1 SMCLK clock cycle to generate a high or low output signal I could do something like that. Or do you have other ideas about this?

    OnOFFKeying.pdf

    Best regards,
    Ali.

  • For fastest MSP430 GPIO read / write (2 CPU cycles) can be used DMA, but 2xx family is without DMA hardware module. For things where fast GPIO is must, I am using low-cost Cortex-M0+ devices where port IO is mapped to CPU address space, and read / write / toggle can be executed at 1 CPU (48 MHz) cycle.

**Attention** This is a public forum