Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
9

Target voltage detected: 0.601975 You need to power your target. The debug adapter does not provide power, it uses the Vtarget pin to determine the output voltage levels.


7

The big reason the DMA isn't transferring is that it isn't actually connected to the peripheral. In most Cortex implementations I've seen, there are multiple memory buses. The ST implementation isn't any different. You can see how GPIO C is attached to the chip's memory system in the table below (found in the Memory map section of the reference manual). ...


6

Basically what @bitsmack suggested should look something like this: #include "stm32f4xx.h" #include "stm32f4xx_hal_cortex.h" #include "stm32f4xx_hal.h" void SystemClock_Config(void); int main(void) { /* Reset of all peripherals, Initializes the Flash interface and the Systick. */ HAL_Init(); /* Configure the system clock */ SystemClock_Config(); ...


5

Probably the logic levels of the UARTs of the two MCUs are not compatible, since they are powered with different voltage levels. As the the STM32F405 datasheet says, that MCU has a supply voltage range of 1.8V...3.6V, whereas the Arduino UNO board powers its MCU (ATmega 328P) at 5V. As Bence Kaulics confirms in its comment, your F4 discovery board powers ...


5

The manual is pretty clear — JP1 is for measuring the current consumed by the board. It's even labeled "Idd" in the silkscreen. JP2 and JP3 on the back are just extra ground connections (for scope probes, etc.). You can see them in the schematic diagram.


4

I would like to share the updated code, which actually works (no library needed): #include <stdio.h> #include "stm32l1xx.h" // Keil::Device:Startup //Initialize the timers variables. volatile int timespan = 0; // Total pulse width volatile int lastcounter = 0; // ...


4

There is lots of code that you haven't given to us, but since you are new to the STM32 family, I will explain the "classic cause" for this type of problem as this is probably the cause for you too. On many STM32 cores, including the STM32F4 on your board, the various peripheral block clocks are disabled by default, to save power. If your code tries to ...


4

I experienced the same problem and there are two solutions to get the behavior of the old board. Use the ST-Link Upgrade Utility to flash to an older version of the ST-Link v2/1. With version V2.J23.M9 it's ok. But you lose the compatibility to mbed. Open the solder bridge SB19. The new board has this bridge closed, resulting in a low BOOT1-pin. When the ...


4

I haven't used this HAL, but it looks like you are missing some necessary system configuration code. I would expect to see (at least) something like this: RCC_OscInitTypeDef RCC_OscInitStruct; RCC_ClkInitTypeDef RCC_ClkInitStruct; HAL_Init(); // Oscillator settings here: // ... // ... HAL_RCC_OscConfig(&RCC_OscInitStruct); // System clock settings ...


4

The User Guide for your board recommends a MC306-G-06Q-32.768. I referred to the schematic on page 28: Don't forget to also fit R21, R22, C16 & C27 too. If you choose a different crystal to use, make sure you check that crystal's datasheet for the appropriate capacitance values to use for C16 & C27.


4

Look at the Low Level library (LL) this provides a much lighter weight wrapper around the registers. You can generate the LL code from Cube by selecting LL from the advanced settings tab in the Project Manager section. You should see a list of peripherals and be able to select HAL or LL. I have not had much joy in mixing HAL and LL so generally pick one ...


4

Is it possible to use the GPIOs without interfering with the internal goodies? I mean, if I use a GPIO pin which is also used by the LCD, can it be a problem? Yes. Unplug the LCD glass from the board -- it's mounted in a DIP-style socket. Once you've done this, the pins are available for use. There are a few other peripherals on this board which cannot ...


3

With help from people on STM32 forum, I found out I was missing the following additional code to make advanced timer work the same way as general-purpose timer: TIM_BDTRInitTypeDef TIM_BDTRInitStruct; TIM_BDTRStructInit(&TIM_BDTRInitStruct); TIM_BDTRConfig(TIM1, &TIM_BDTRInitStruct); TIM_CCPreloadControl(TIM1, ENABLE); TIM_CtrlPWMOutputs(TIM1, ...


3

Your ticks_for_scheduler variable simply counts from 0-99 over and over again, one count per millisecond. This means that it contains any particular value once every 100 ms. In your main function, that's all you're checking for — whether the variable contains a particular value. So each task will only execute once every 100 ms. My goal is to ...


3

They use JP2 and JP3 for essentially stand offs because they are the same height as all the other pins. Without them the board would not sit well. Funny design.


3

The STM32F407 is a strict superset of the STM32F405. (Indeed, they share a single datasheet.) As long as you're working with the same package and flash size, code that runs on the '405 will work identically on the '407.


2

Have you tried this function? USBD_Init(USBD_HandleTypeDef *pdev, USBD_DescriptorsTypeDef *pdesc, uint8_t id) The documentation for this library is located here, but it's not great. In general, the HAL gives you some functions and if you use them correctly, a lot of other things happen behind the scenes. Your USBD_AUDIO_Init may be one of those things.


2

I found the solution. I used HAL_FLASH_Lock() function instead of HAL_FLASHEx_Erase() function and it works fine. I also changed SECTOR because I was accidently erasing my program. unit32_t address = 0x0800C000; HAL_FLASH_Unlock(); __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | ...


2

This is probably because your Hal_Delay function is not working properly. Hal_Delay function will enter a busy loop that will compare an interrupt incremented value with the value you specify as argument. The interrupt functions will get initiated when calling HAL_init(), otherwise you need to make this configuration yourself. To summarize, make sure that ...


2

I had the same question with V2J25 firmware. And I found if I upgrade to V2J27M15 (newest version 2016/09/16), it is solved.


2

hadc1.Init.ScanConvMode = DISABLE; the sequencer is disabled so you cant read or even convert data coming from the other channel. Also you have to define the rank of every channel. for exemple : sConfig.Rank = 1; sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5 ; sConfig.Channel = REF_1_5_Volt_Pin; HAL_ADC_ConfigChannel(&hadc, &...


2

This portion of your code: void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin){ uint8_t msg; if(HAL_SPI_Receive_IT(&hspi1,&msg,sizeof(msg))==HAL_OK){ HAL_GPIO_TogglePin(GPIOE,GPIO_PIN_9); currentstatepin=HAL_GPIO_ReadPin(GPIOE,GPIO_PIN_9); } } Represents a complete misunderstanding of Interrupt-driven SPI reception. The ...


2

One way of doing this is to write the value you want into the first location of the target buffer, then carry out the DMA operation with the source address set to the start of the target buffer, the destination address set to the start of the target buffer plus one and the buffer length set to the length of the target buffer minus one. The DMA operation will ...


2

I believe C38 is not fitted because this circuit does not debounce the way that ST intended, I did some spice simulations just to check (I would suggest that you could also do this for the exercise). I would move C38 in parallel with R39. Then tweak the values of R38 and R39 (I'm assuming you're familiar with time constants of RC circuits) to get the desired ...


2

The STM32f407 as used on the disco board doesn't have the crypto hardware, the STM32f417 is the pin and code compatible part with cryptographic hardware. This Page provides details, see bullet point #8 The STM32F417 also integrates a crypto/hash processor providing hardware acceleration for AES 128, 192, 256, Triple DES, and hash (MD5, SHA-1)


2

An idea is to make use of timer interrupts. The "Mode" will reset the timer and decide the initial value loaded to timer. The loaded value depends on time interval you want. On each timer interrupt, the control will shift to its ISR, where you read the sensor value. Pseudocode will look something like: Timer_ISR() { x = readSensor(); }


2

The Preemption Priority allows an ISR to be preempted (interrupted) by another interrupt of higher priority. When the higher-priority interrupt is completed, the lower-priority interrupt continues from where it left off. Subpriority, on the other hand, has nothing to do with preemption. Say that you have two interrupts of the same priority which are both ...


2

Yes, the STM32CubeMX initialization generator tool provides configuration pages for the timer peripherals. Though these aren't graphical, they do allow for easier initialization of the timer resources. This includes the counter settings themselves (prescaler, direction, etc.), as well as slave configuration and settings for DMA, PWM, and other timer modes. ...


2

Although Blargian already gave his answer as a comment, I thought I should formally answer in case anyone has the same problem. I will refer to the document "STM32F429ZI Discovery Kit User Manual" (search for "en.DM00093903" or "UM1670") as "the user manual" in the below paragraphs. In section 6.13 of the user manual, it indicates that solder bridge "SB9" ...


2

There's no officially supported way of doing this. ST does not make the ST-Link firmware available for public use. Unless you're designing a development board, there's no reason to use an onboard ST-Link anyway. If you want to allow the user to update the firmware on their device, consider implementing a USB bootloader (or using one that's already present ...


Only top voted, non community-wiki answers of a minimum length are eligible