Hey,
I just got my hands on a [STM32F103RB dev kit with a 2.8in LCD using the Ili9320 controller. I am having a horrible time tracking down any documentation on how to actually initialize hardware properly and a description of all the peripherals. [HERE is a link to an example program running the LCD. It is wonderfully laid out but I dont understand things like this:
void MYRCC_DeInit(void)
{
RCC->APB1RSTR = 0x00000000;
RCC->APB2RSTR = 0x00000000;
RCC->AHBENR = 0x00000014;
RCC->APB2ENR = 0x00000000;
RCC->APB1ENR = 0x00000000;
RCC->CR |= 0x00000001;
RCC->CFGR &= 0xF8FF0000; // SW[1:0],HPRE[3:0],PPRE1[2:0],PPRE2[2:0],ADCPRE[1:0],MCO[2:0]
RCC->CR &= 0xFEF6FFFF; // HSEON,CSSON,PLLON
RCC->CR &= 0xFFFBFFFF; // HSEBYP
RCC->CFGR &= 0xFF80FFFF; // PLLSRC, PLLXTPRE, PLLMUL[3:0] and USBPRE
RCC->CIR = 0x00000000;
#ifdef VECT_TAB_RAM
// NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else /* VECT_TAB_FLASH */
// NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
#endif
}
What does RCC do and where can I find out what things like AHBENR even mean? I found the headers files that define the structures and map them to internal registers but It seems each compiler has its own headers and RCC is special to whatever compiler this program was made with. I suspect Kiel.
I will be using Rowley CrossWorks and haven’t found a single tutorial for that yet.
Can anybody give me a hand or point me to some website explaining how to interface with the ARM’s peripherals?](http://www.micro4you.com/files/STM32/2.8%20TFT%20LCD%20V3%20demo.rar)](http://www.micro4you.com/store/Mini-STM32-STM32F103-TFT-LCD-Board-V3/prod_133.html)