STM32F4

Thanks for that Rob, I had actually read that before!

Well I have been working a lot on this STM32F4 and it hasn't been easy but nothing in life worth doing ever is

I have so far managed to:

Set up ports and blink LED's

Do some hardcore maths (well power series!, and it is pretty quick)

Use a timer to count and generate an interrupt

Use the ADC (this is something I am currently working on as the reading seems to saturate at 3V????) its pretty complex with all the settings

Got much better with Attolic and C programming and learnt to debug (ish)

So much more to learn not least with C

For instance what the hell does the typedef do to a structure??

typedef struct
{
  uint32_t ADC_Resolution;                /*!< Configures the ADC resolution dual mode. 
                                               This parameter can be a value of @ref ADC_resolution */                                   
  FunctionalState ADC_ScanConvMode;       /*!< Specifies whether the conversion 
                                               is performed in Scan (multichannels) 
                                               or Single (one channel) mode.
                                               This parameter can be set to ENABLE or DISABLE */ 
  FunctionalState ADC_ContinuousConvMode; /*!< Specifies whether the conversion 
                                               is performed in Continuous or Single mode.
                                               This parameter can be set to ENABLE or DISABLE. */
  uint32_t ADC_ExternalTrigConvEdge;      /*!< Select the external trigger edge and
                                               enable the trigger of a regular group. 
                                               This parameter can be a value of 
                                               @ref ADC_external_trigger_edge_for_regular_channels_conversion */
  uint32_t ADC_ExternalTrigConv;          /*!< Select the external event used to trigger 
                                               the start of conversion of a regular group.
                                               This parameter can be a value of 
                                               @ref ADC_extrenal_trigger_sources_for_regular_channels_conversion */
  uint32_t ADC_DataAlign;                 /*!< Specifies whether the ADC data  alignment
                                               is left or right. This parameter can be 
                                               a value of @ref ADC_data_align */
  uint8_t  ADC_NbrOfConversion;           /*!< Specifies the number of ADC conversions
                                               that will be done using the sequencer for
                                               regular channel group.
                                               This parameter must range from 1 to 16. */
}ADC_InitTypeDef;

which is a structure so that when I type the below

ADC_InitTypeDef ADC_InitStructure;

  ADC_InitStructure.ADC_Resolution = ADC_Resolution_12b;
  ADC_InitStructure.ADC_ScanConvMode = ENABLE;
  ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
  ADC_InitStructure.ADC_ExternalTrigConvEdge = ADC_ExternalTrigConvEdge_None;
  ADC_InitStructure.ADC_ExternalTrigConv=0x00000000;
  ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
  ADC_InitStructure.ADC_NbrOfConversion = 2;
  ADC_Init(ADC1, &ADC_InitStructure);

A structure is created called ADC_InitStructure which is identical to the structure ADC_Init

The different members are populated then the program uses

ADC_Init(ADC1, &ADC_InitStructure);

To go to the ACD_INIT structure with the variable ADC1 and the address of the ADC_InitStructure

I also see uint32_t/uint16_t etc now its obviously an unsigned 32/16 bit int but whats the difference with just the unsigned int data type?

Now thats my understanding and I am wrong a lot please explain/discuss

these STM32F4 boards are really really good fun