1. Shear_Intelligence

    Thread Starter New Member

    Jun 10, 2012
    29
    0
    hi there, i recently worked on 8051 based microcontrollers, now i decided to switch to ARM micro controller, i borrowed a board name stm32f407vg discovery from my teacher, i want to learn arm can anyone suggest me any resource or any book? i have to finish this in 3 weeks if anyone has idea or any link or any suggestion please share. thaks

    SI
     
  2. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    finish what in 3 weeks?
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    Finish what in three weeks? I've been working with ARM for 15 months and I'm still not done.

    Go to the IAR website and download the IAR EWARM.
     
  4. Eric007

    Senior Member

    Aug 5, 2011
    1,044
    33
    Again finish what in 3 weeks my friend? lol
     
  5. Shear_Intelligence

    Thread Starter New Member

    Jun 10, 2012
    29
    0
    i mean i have to finish learning arm in 3 weeks so that i can use it in my final year project. modules i need to use in my fyp are usb OTG, usart and adc with atleast 2 mega samples per seconds then i will write software to accuse data to computer through usart.
     
  6. kubeek

    AAC Fanatic!

    Sep 20, 2005
    4,670
    804
    wow, that is sure a lot to learn in 3 weeks.
     
  7. Eric007

    Senior Member

    Aug 5, 2011
    1,044
    33
    is ARM a MUST for your fyp or not?
     
  8. Shear_Intelligence

    Thread Starter New Member

    Jun 10, 2012
    29
    0
    i have done it all the problem is that i dont really know where to begin the coding or start programming. in other modules we can do very basic example to get started like led blinking etc. can you tell me where did you learn arm?
     
  9. Shear_Intelligence

    Thread Starter New Member

    Jun 10, 2012
    29
    0
    yes it is dear
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    I learned to use the ARM by looking at the project examples under Projects.
    Start by toggling an I/O pin.

    I can send you some code later this week.

    (You are not going to learn it all in 3 weeks).
     
  11. Shear_Intelligence

    Thread Starter New Member

    Jun 10, 2012
    29
    0
    honey i just need to use adc and uart. i will try my best to do it in 3 weeks. and yes please send me your codes.
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    Look for IO_Toggle example in the ...\Project\... folder.
    You should be able to open this from the IAR EWARM IDE.

    In any case it is in the STM32F4DISCOVERY installation folder:

    C:\Documents and Settings\... ...\My Documents\Downloads\stm32f4discovery_fw\STM32F4-Discovery_FW_V1.0.1\Project\Peripheral_Examples\IO_Toggle

    Here is the listing of main.c. With this code you can make the LEDs flash:

    PD12 - LED4 - Green
    PD13 - LED3 - Orange
    PD14 - LED5 - Red
    PD15 - LED6 - Blue


    Code ( (Unknown Language)):
    1.  
    2. /**
    3.   ******************************************************************************
    4.   * @file    IO_Toggle/main.c
    5.   * @author  MCD Application Team
    6.   * @version V1.0.0
    7.   * @date    19-September-2011
    8.   * @brief   Main program body
    9.   ******************************************************************************
    10.   * @attention
    11.   *
    12.   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
    13.   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
    14.   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
    15.   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
    16.   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
    17.   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
    18.   *
    19.   * <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
    20.   ******************************************************************************  
    21.   */
    22.  
    23. /* Includes ------------------------------------------------------------------*/
    24. #include "stm32f4_discovery.h"
    25.  
    26. /** @addtogroup STM32F4_Discovery_Peripheral_Examples
    27.   * @{
    28.   */
    29.  
    30. /** @addtogroup IO_Toggle
    31.   * @{
    32.   */
    33.  
    34. /* Private typedef -----------------------------------------------------------*/
    35. GPIO_InitTypeDef  GPIO_InitStructure;
    36.  
    37. /* Private define ------------------------------------------------------------*/
    38. /* Private macro -------------------------------------------------------------*/
    39. /* Private variables ---------------------------------------------------------*/
    40. /* Private function prototypes -----------------------------------------------*/
    41. void Delay(__IO uint32_t nCount);
    42. /* Private functions ---------------------------------------------------------*/
    43.  
    44. /**
    45.   * @brief  Main program
    46.   * @param  None
    47.   * @retval None
    48.   */
    49. int main(void)
    50. {
    51.   /*!< At this stage the microcontroller clock setting is already configured,
    52.        this is done through SystemInit() function which is called from startup
    53.        file (startup_stm32f4xx.s) before to branch to application main.
    54.        To reconfigure the default setting of SystemInit() function, refer to
    55.         system_stm32f4xx.c file
    56.      */
    57.  
    58.   /* GPIOD Periph clock enable */
    59.   RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
    60.  
    61.   /* Configure PD12, PD13, PD14 and PD15 in output pushpull mode */
    62.   GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12 | GPIO_Pin_13| GPIO_Pin_14| GPIO_Pin_15;
    63.   GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
    64.   GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
    65.   GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
    66.   GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
    67.   GPIO_Init(GPIOD, &GPIO_InitStructure);
    68.  
    69.   while (1)
    70.   {
    71.     /* PD12 to be toggled */
    72.     GPIO_SetBits(GPIOD, GPIO_Pin_12);
    73.    
    74.     /* Insert delay */
    75.     Delay(0x3FFFFF);
    76.    
    77.     /* PD13 to be toggled */
    78.     GPIO_SetBits(GPIOD, GPIO_Pin_13);
    79.    
    80.     /* Insert delay */
    81.     Delay(0x3FFFFF);
    82.  
    83.     /* PD14 to be toggled */
    84.     GPIO_SetBits(GPIOD, GPIO_Pin_14);
    85.    
    86.     /* Insert delay */
    87.     Delay(0x3FFFFF);
    88.    
    89.     /* PD15 to be toggled */
    90.     GPIO_SetBits(GPIOD, GPIO_Pin_15);
    91.    
    92.     /* Insert delay */
    93.     Delay(0x7FFFFF);
    94.    
    95.     GPIO_ResetBits(GPIOD, GPIO_Pin_12|GPIO_Pin_13|GPIO_Pin_14|GPIO_Pin_15);
    96.    
    97.     /* Insert delay */
    98.     Delay(0xFFFFFF);
    99.   }
    100. }
    101.  
    102. /**
    103.   * @brief  Delay Function.
    104.   * @param  nCount:specifies the Delay time length.
    105.   * @retval None
    106.   */
    107. void Delay(__IO uint32_t nCount)
    108. {
    109.   while(nCount--)
    110.   {
    111.   }
    112. }
    113.  
    114. #ifdef  USE_FULL_ASSERT
    115.  
    116. /**
    117.   * @brief  Reports the name of the source file and the source line number
    118.   *         where the assert_param error has occurred.
    119.   * @param  file: pointer to the source file name
    120.   * @param  line: assert_param error line source number
    121.   * @retval None
    122.   */
    123. void assert_failed(uint8_t* file, uint32_t line)
    124. {
    125.   /* User can add his own implementation to report the file name and line number,
    126.      ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
    127.  
    128.   /* Infinite loop */
    129.   while (1)
    130.   {
    131.   }
    132. }
    133. #endif
    134.  
    135. /**
    136.   * @}
    137.   */
    138.  
    139. /**
    140.   * @}
    141.   */
    142.  
    143. /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
    144.  
    145.  
     
  13. JDT

    Well-Known Member

    Feb 12, 2009
    658
    85
  14. BorealDude

    New Member

    May 20, 2013
    9
    0
    hi
    im a new commer to the ARM world.but have enough experience at AVR.
    whats your seggestion for starting ARM programming?
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,442
    3,361
    Get the STM32F4Discovery and download the IAR EWARM.
     
Loading...