Hi All,
How to produce below waveform by using PWM+DMA on TI-RTOS?
Thanks.
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.
Hi,
This code can change the duty:
https://dev.ti.com/tirex/explore/node?node=A__AMgR3u96o8KiJhcB5kFPFA__msp430ware__IOGqZri__LATEST
And this should can used in TI-RTOS or NO RTOS.
Thanks!
Best Regards
Johnson
Hi Johnson,
I only want to use one pin that can dynamic adjustment duty after each pulse.
For example output 10 pulse that duty maybe like 75% 25% 75% 25% 75% 25%... or 75% 75% 25% 25% 75% 75% 25% 25%.
Like above waveform picture.
How should I do?
Thanks.
Hi,
I think you need use DMA to change duty register.
Or enable Zero Load interrupt to change duty in interrupt route.
Thanks!
Best Regards
Johnson
Hi Johnson,
Can you tell me how to setting PWM with DMA?
I find some documents but not found any describe.
Can you give me some tips or examples?
Thanks.
For example output 10 pulse that duty maybe like 75% 25% 75% 25% 75% 25%... or 75% 75% 25% 25% 75% 75% 25% 25%.
Are you interfacing to something like ws2812b neopixels, which interpret different widths as a zero or one?
A different approach might be to use the SPI interface and write different words which generate the required pulse stream. E.g. as someone did with a different ARM based microcontroller in MSP-EXP432E401Y: delay between bytes when transmitting over SPI
Hi Chester,
Yes. my led interface like ws2812b neopixels. How to setting MSP430F5529 SPI+DMA on TI-RTOS system?
Have any example or document to description it?
Thanks.
Hi,
We just provide some exaple code in SDK, for application code maybe need design by yourself.
Thanks!
Best Regards
Johnson
Hi Johnson,
I try to modify example. But I find the SPI max clock is 1MHz.
If I setting over 1 MHz, the clock frequency is not match real value.
For example :
1. If I setting spi_master_Params.bitRate = 1000000, it will become 1MHz.
2. If I setting spi_master_Params.bitRate = 2700000, it will become 4MHz.
Is the MSP430 limit on TI-RTOS? or have method to overcome it?
Thanks.
Hi,
F5529 SPI clock can set up to system clock:
Thus maybe there are some setting error, have you try our example code for RTOS?
Unfortunately, I'm not very familiar with RTOS.
Thanks!
Best Regards
Johnson
Hi Johnson,
1. Yes, I open TI-RTOS basic example and run SPI.
my DCO FLL and ACLK are reference = REFO.
If setting under 1MHz, the frequency is very accurate. But over 1MHz will not.
2. My setting on below:
SPI_Params_init(&spi_master_Params);
spi_master_Params.transferMode = SPI_MODE_BLOCKING;
spi_master_Params.transferCallbackFxn = NULL;
spi_master_Params.mode = SPI_MASTER;
spi_master_Params.bitRate = 2700000,
spi_master_Params.dataSize = 8;
and I print clock value are on below:
MCLK = 8192000
ACLK = 32768
SMCLK = 8192000
Hi,
Could you share your project for SPI with RTOS, I can try to debug when I get back to office.
Thanks!
Best Regards
Johnson
**Attention** This is a public forum