2018-12-09 09:45 AM
Hi All,
I use STM32f103C8T6 mcu to control a 5" TFT (480x272) display in direct mode.
TIM1 PWM is the 9Mhz pixel clock,
TIM2 is the column counter,
TIM3 is the row counter
and TIM2 channel 2 in compare mode, start SPI DMA transmit once in line
so, the SPI TX DMA not work after power up. (see my oscilloscope and dont show a picture) but, reset the mcu or reprogram its work perfectly.
test hardware the "blue pill" :)
i use my function libraryes.
i uploaded my full project.
Any Idea?
Solved! Go to Solution.
2018-12-09 01:58 PM
I found the problem, i not set SSM and SSI bits in CR1.
Why setting up? I not use NSS output.
2018-12-09 09:52 AM
I tested the SPE bit. It is low state after power on and the led is not lighting.
now i press the reset button on the pcb and led is on, and its working.
SET_BIT(SPI1->CR1, SPI_CR1_SPE); //SPI be
spi_is_enabled();
void spi_is_enabled()
{
if(READ_BIT(SPI1->CR1, SPI_CR1_SPE))
{
SET_BIT(GPIOC->BSRR, 1 << 29);
}
else
{
SET_BIT(GPIOC->BSRR, 1 << 13);
}
}
2018-12-09 01:58 PM
I found the problem, i not set SSM and SSI bits in CR1.
Why setting up? I not use NSS output.