реклама на сайте
подробности

 
 
 
Reply to this topicStart new topic
> stm32f103rb нужен срочно рабочий hex файл
andron86
сообщение Oct 6 2010, 10:45
Сообщение #1


Местный
***

Группа: Участник
Сообщений: 406
Регистрация: 1-03-06
Пользователь №: 14 821



Если кого не затруднит, сделайте пожалуйста рабочий нех. компилятор не важен, нужно ножгой PD2 или PC12 подёргать. Срочно пожалуйста!!!! 1111493779.gif
Go to the top of the page
 
+Quote Post
skripach
сообщение Oct 6 2010, 12:54
Сообщение #2


■ ■ ■ ■
*****

Группа: Свой
Сообщений: 1 100
Регистрация: 9-08-06
Пользователь №: 19 443



Сколько денег? biggrin.gif
Что мешает самому сделать?


--------------------
Делай что должен и будь что будет.
Go to the top of the page
 
+Quote Post
andron86
сообщение Oct 6 2010, 14:16
Сообщение #3


Местный
***

Группа: Участник
Сообщений: 406
Регистрация: 1-03-06
Пользователь №: 14 821



Цитата(skripach @ Oct 6 2010, 14:54) *
Сколько денег? biggrin.gif
Что мешает самому сделать?

да нету средств под рукой. думаю скомпильнуть это не составит труда:
Код
GPIO_InitTypeDef GPIO_InitStructure;

    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_6 | GPIO_Pin_7;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
    GPIO_Init(GPIOB, &GPIO_InitStructure);


    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_2;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
    GPIO_Init(GPIOD, &GPIO_InitStructure);

    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_12;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
    GPIO_Init(GPIOC, &GPIO_InitStructure);
        while(1){
            GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_SET);
            for(i=0; i<30000;i++);
            GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_RESET);
            for(i=0; i<30000;i++);

            GPIO_WriteBit(GPIOC, GPIO_Pin_12, Bit_SET);
            for(i=0; i<30000;i++);
            GPIO_WriteBit(GPIOC, GPIO_Pin_12, Bit_RESET);
            for(i=0; i<30000;i++);
        }
Go to the top of the page
 
+Quote Post
e-serg
сообщение Oct 6 2010, 16:55
Сообщение #4


Частый гость
**

Группа: Участник
Сообщений: 97
Регистрация: 24-07-08
Из: Иркутск
Пользователь №: 39 180



Цитата(andron86 @ Oct 6 2010, 23:16) *
да нету средств под рукой. думаю скомпильнуть это не составит труда:
Код
GPIO_InitTypeDef GPIO_InitStructure;
===============================
        }

этого мало, а клоки еще надо.
Go to the top of the page
 
+Quote Post
andron86
сообщение Oct 7 2010, 06:27
Сообщение #5


Местный
***

Группа: Участник
Сообщений: 406
Регистрация: 1-03-06
Пользователь №: 14 821



Цитата(e-serg @ Oct 6 2010, 18:55) *
этого мало, а клоки еще надо.

Код
    
GPIO_InitTypeDef GPIO_InitStructure;

     RCC_DeInit();
    /* Enable HSE */
    RCC_HSEConfig(RCC_HSE_ON);

    /* Wait till HSE is ready */
    if (RCC_WaitForHSEStartUp() == SUCCESS)
    {
        /* Enable Prefetch Buffer */
         FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
         /* Flash 2 wait state */
         FLASH_SetLatency(FLASH_Latency_2);
         /* HCLK = SYSCLK */
         RCC_HCLKConfig(RCC_SYSCLK_Div1);

         /* PCLK2 = HCLK */
         RCC_PCLK2Config(RCC_HCLK_Div1);

         /* PCLK1 = HCLK/2 */
         RCC_PCLK1Config(RCC_HCLK_Div2);

         /*  PLLCLK =24MHz * 3 = 72 MHz */
         RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_3);

         /* Enable PLL */
         RCC_PLLCmd(ENABLE);

         /* Wait till PLL is ready */
         while (RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
         {
         }

         /* Select PLL as system clock source */
         RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

         /* Wait till PLL is used as system clock source */
         while (RCC_GetSYSCLKSource() != 0x08)
         {
         }

         /* Enable peripheral clocks --------------------------------------------------*/
         /* Enable GPIOD GPIOC clocks */
         RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD | RCC_APB2Periph_GPIOC, ENABLE);
         /* Enable DMA clock */
         RCC_AHBPeriphClockCmd(RCC_AHBPeriph_DMA, ENABLE);
    }

    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_6 | GPIO_Pin_7;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD;
    GPIO_Init(GPIOB, &GPIO_InitStructure);


    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_2;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
    GPIO_Init(GPIOD, &GPIO_InitStructure);

    GPIO_InitStructure.GPIO_Pin =  GPIO_Pin_12;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
    GPIO_Init(GPIOC, &GPIO_InitStructure);
        while(1){
            GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_SET);
            for(i=0; i<30000;i++);
            GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_RESET);
            for(i=0; i<30000;i++);

            GPIO_WriteBit(GPIOC, GPIO_Pin_12, Bit_SET);
            for(i=0; i<30000;i++);
            GPIO_WriteBit(GPIOC, GPIO_Pin_12, Bit_RESET);
            for(i=0; i<30000;i++);
        }
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 27th June 2025 - 13:31
Рейтинг@Mail.ru


Страница сгенерированна за 0.01434 секунд с 7
ELECTRONIX ©2004-2016