Jump to content

Search the Community

Showing results for tags 'STM32F4'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 21 results

  1. I'm looking to drive an 800x480 LCD using an STM32F429 and the STemWin graphics library, due to the other peripherals needed from the chip, the SDRAM will most likely be limited to 16-bit. Could this be a serious performance bottleneck? And are there examples of this setup working effectively?
  2. Dear Devs, I've been working with the STM32F4 Discovery board for a couple of weeks now. I've successfully used its USB Device library to connect the board into the PC by creating a custom class. In fact I modified a VCP example and made it a custom class. I used LibUSB to generate the host side application using MFC applications. I tried bulk transfers, interrupt transfers, basic setup transfers and they all worked perfectly. The issue came to me when I tried to make a bulk loop. That is within the firmware I will read the OUT packet and save the data in the Tx buffer and send it back to the host. What I did was, I implemented the 'DCD_EP_Tx' function which is supplied by the 'usb_core.c' within the DataOutStage function. As I understood DCD_EP_Tx enables the endpoint so that the endpoint tx buffer data will be sent to the TxFIFO by the core. The data out function looks like below, USB_Rx_Cnt = ((USB_OTG_CORE_HANDLE*)pdev)->dev.out_ep[epnum].xfer_count; for(i=0;i<USB_Rx_Cnt;i++) { DataSupply_Buffer[i] = USB_Rx_Buffer[i]; } /* Prepare the packet to be send through the IN endpoint DCD_EP_Tx (pdev, CDC_IN_EP, (uint8_t*)DataSupply_Buffer, USB_Rx_Cnt); /* Prepare Out endpoint to receive next packet */ DCD_EP_PrepareRx(pdev, CDC_OUT_EP, (uint8_t*)(USB_Rx_Buffer), CDC_DATA_OUT_PACKET_SIZE); In this case when I send the data from the host and if I did not read the data from the host, a strange thing happens. Let's say I send around 10, 64byte packets from the host. Then later when I read from the device, I can get the first five 64bytes packets I sent. In fact, they store 320bytes within the FIFO or something. But within the 'usb_conf.h' I specify that the Tx1FIFO size should be 128. My problem is how come the device store 320bytes when I set the TX1FIFO depth to 128? I can provide the whole source code if my explanation of the problem is not clear. I'm still going through the Reference manual line by line to understand the issue. But still I did not have any luck. So if someone can shed some light on this matter. It will be highly appreciated. I don't need an exact answer, but if you have then I'm damn lucky. I might be searching for the issue in wrong direction. Need some new perception. Thank you in advance.
  3. Hello, I just started recently to test my stm32F4 with RX/TX communication. I tried for the first time the ChibiOS on it and the demo was a success. But now, I'm trying to use USART_SendData to send data, and here comes the problem: when I use Cutecom, I receive always some hex codes and not what I need to see (in my case: 'A'): Here are the hex codes I always receive : \0x1c\0xfc Here is a hint of my main.c /* USART Configuration */ USART_Configuration(); USART_SendData(USART2, '5'); I tried to change the ChibiOS exemple, and it succeeded: chprintf((BaseChannel *)&SD2, "A"); But I don't want to use ChibiOS because I don't find the equivalent function of USART_ReceiveData So, do you know any solution?
  4. Hello, just want to know how many of you have the STM32 discovery kit. I currently have the STM32F0. Other than the floating point capability, what advantage does the F4 kit have over the F0?
  5. Hi, I have an STM32F4 Discover for about a month now, its the first microcontroller I ever used and I started to wonder if it was a good choice. For the money I payed (13€) it was definitely worth it, but I find it quite hard to program. I have a strong background in math and programming and I'm usually pretty good at figuring things out, but that nut is hard to crack for me. I got the summon-arm toolchain installed easily on linux, I got stlink working without a problem, but I didn't manage to configure eclipse to work with the ST Library. I tried several other things like libopencm3, chibios and even some weired code by dasLabor. But none really helped. I want to control a few PWMs and read a few A/Ds and control that via USB. So the question is, is an STM32F4 to hard to get used to if you never had a uC before? The arduino is much too limited for me, thats why I got the STM. I don't want a toy system, but fiddling with register values to activate some function may be a bit too much for me right now. Are there maybe older uC (boards) with maybe more mature software support then the relatively new STM32F4? Thanks for reading, Mathias
  6. Hello, I have the STM32F4 kit and was wondering if anybody has interfaced theirs to a smartcard.
  7. The board has micro-SD card, USB host, USB-OTG,all ports break out on connectors and ARDUINO platform connectors. MAPLE support for F4 is on the way, so this board will be one powerful Arduino alternative
  8. Well hello, this forum seems to be new (??) but you guys seem to be hanging out here quite a lot. I guess I am dumb... I have been trying to get my programming environment running for a .... long time by now. Each time i tried it did end up in frustration and I didnt touch it for a few month. I have got several STM32VLDISCOVERY - Bords and a STM32F4DISCOVERY - Board. My latest attemp was to setup eclipse with codesourcery, compile fof the SMT32F100 and debug with ST-Link (linux). Setting up codesourcery and eclipse is not a problem, but i never get the projects right. I end up having tons of errors with the st-library or some other files.... Are there any preconfigured eclipse projects for the STM32VLDISCOVERY and the STM32F4DISCOVERY ? I should be fine if it's not configured f0r st-link. Thanks ... i'm really thinking about giving away my stm-boards if it's not gonna work soon.
  9. I can now talk to my ADC on my discovery kit. Are there any examples out there to use DMA? I'll try coding it up, but any help is appreciated.
  10. More info will be posted here. Its basically a control for a cnc machine using GRBL as the controller. http://www.shapeoko....70&p=2960#p2960
  11. I'm not sure why he used a bunch of adapters instead of a single USB micro-usb B to a Type A female. Here it is anyway.
  12. Looking to what to do with my Discovery kit( not forgetting my Stellaris kit), came across this nice design of using a master 8x8 rgb block to control similar blocks around it. It is driven by a STM32F4105 microcontroller. Below is another project inspired by it:
  13. Not much details on the code, but the very fact that it can do ~30fps on a 320x240 LCD is impressive. I'm not sure of the resolution of the lcd, but it sure looks like 320x240. Move plays through an sd card. More description at the guy's webpage here.
  14. void ConfigUSART2(uint32_t BAUD, uint32_t apbclock) { uint32_t tmpreg = 0x00; uint32_t integerdivider = 0x00; uint32_t fractionaldivider = 0x00; RCC->APB1ENR = (1 << 17); //Enable USART2 Clock GPIOD->MODER |= (2 << 10); //Setup TX pin for Alternate Function GPIOD->MODER |= (2 << 12); //Setup RX pin for Alternate Function GPIOD->AFR[0] |= (7 << 20); //Setup TX as the Alternate Function GPIOD->AFR[0] |= (7 << 24); //Setup RX as the Alternate Function USART2->CR1 |= (1 << 13); //Enable USART integerdivider = ((25 * apbclock) / (2 * (BAUD))); tmpreg = (integerdivider / 100) << 4; fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); USART2->BRR = (uint16_t)tmpreg; USART2->CR1 |= (3 << 2); //Enable Tx & Rx } Basic Functions: void putchar(USART_TypeDef* myUSART, uint32_t data) { myUSART->DR = (char)data; while(((myUSART->SR >> 6) & 0x01) == 0); } void putstr(USART_TypeDef* myUSART, char *data) { while(*data) putchar(myUSART,*data++); }
  15. #include <stm32f4xx.h> #define ALL_GPIO 0x1FF #define LED 15 void main(void) { RCC->AHB1ENR = ALL_GPIO; GPIOD->MODER |= (1 << (LED * 2));//OUTPUT GPIOD->OSPEEDR |= (0x02 << (LED * 2));//50MHz GPIOD->PUPDR &= (0x03 << (LED * 2)); //Set it for NO PUPD GPIOD->BSRRL |= (1<<LED); while(1) { } }
  16. /********************************************************************** GPIO Mode Register - GPIOx->MODER 00 = INPUT 01 = OUTPUT 10 = ALTERNATE FUNCTION 11 = ANALOG Example: Make LED pin output **********************************************************************/ #define LED 3 GPIOx->MODER |= (1 << (LED * 2)); //Set to Output /********************************************************************** GPIO Type Register - GPIOx->OTYPER 0 = PUSH-PULL (default) 1 = Open Drain Example: Make LED pin push-pull type **********************************************************************/ #define LED 3 GPIOx->OTYPER &= !(1 << LED); //Set to Push-Pull /********************************************************************** GPIO Output Speed Register - GPIOx->OSPEEDR 00 = 2MHz (Low Speed) 01 = 25MHz (Med. Speed) 10 = 50MHz (Fast Speed) 11 = 100MHz/80MHz (High Speed)(100MHz(30pf) - 80MHz(15pf)) Example: Make LED pin 100MHz **********************************************************************/ #define LED 3 GPIOx->OSPEEDR |= (0x02 << (LED * 2)); //Set Max of 50MHz Speed /********************************************************************** GPIO Pull-Up / Pull-Down Register - GPIOx->PUPDR 00 = No Pull-Up / No Pull-Down 01 = Pull-Up Enabled 10 = Pull-Down Enabled 11 = Reserved Example: LED pin with NO PU/PD **********************************************************************/ #define LED 3 GPIOx->PUPDR |= (0x03 << (LED * 2)); //Set it for NO PUPD /********************************************************************** GPIO Input Data Register - GPIOx->IDR Read Pin State Example: Get input from button **********************************************************************/ #define BTN 2 variable = ((GPIOx->IDR >> BTN) & 1); //Get Button State /********************************************************************** GPIO Output Data Register - GPIOx->ODR Write Pin State Example: Turn on LED **********************************************************************/ #define LED 3 GPIOx->ODR |= (1<<LED); //Turn on LED /********************************************************************** GPIO Bit Set/Reset Register - GPIOx->BSRRn n = H (RESET) n = L (SET) Set or Reset Pins Example: Turn LED On then Off **********************************************************************/ #define LED 3 GPIOx->BSRRL |= (1<<LED); //Turn On LED GPIOx->BSRRH |= (1<<LED); //Turn Off LED /********************************************************************** RCC AHB1 peripheral clock register (RCC_AHB1ENR)(5.3.10 in REF MAN) BIT H = ON BIT L = OFF Example: Enable all GPIO Clocks (A:I) **********************************************************************/ #define ALL_GPIO 0x1FF RCC->AHB1ENR = ALL_GPIO; GPIO Funtion: void ConfigPin(GPIO_TypeDef *myGPIO, uint32_t PIN, uint32_t MODE, uint32_t SPEED, uint32_t PUPD) { /* myGPIO: The GPIOx port for the selected pin MODE: 0 = INPUT .... 1 = OUTPUT .... 2 = ALTERNATE FUNCTION .... 3 = ANALOG SPEED: 0 = 2MHz (Low Speed) .... 1 = 25MHz (Med. Speed) .... 2 = 50MHz (Fast Speed) .... 3 = 100MHz/80MHz (High Speed)(100MHz(30pf) - 80MHz(15pf)) PUPD: 0 = No Pull-Up / No Pull-Down .... 1 = Pull-Up Enabled .... 2 = Pull-Down Enabled .... 3 = Reserved */ myGPIO->MODER |= (MODE << (PIN * 2));//OUTPUT myGPIO->OSPEEDR |= (SPEED << (PIN * 2));//50MHz myGPIO->PUPDR |= (PUPD << (PIN * 2)); //Set it for NO PUPD }
  17. Thomas Jesperson's twitter account just popped this project up.He was kind enough to share his project when someone asked for it in the comments. The STM32F4 kit connects to the ENC28J60 via spi. More interesting reviews at Thomas' page.
  18. Found over at youtube. Backup of the code is below in case the site it's hosted on goes down.
  19. Found this in my STM32 adventures. Keeping it here if anyone finds it useful. He has some more cool stuff. Check out his site. USART_2_STM32F4_Discovery.txt
  20. Sorry guys, me again with my questions. According to my previous thread, i have eclipse and code sourcery compiling my led project fine. I installed gdbserver using steps from this link. When I click "Run external tools->gdbserver" I get the following. I'm close, yet far. . I'd be thankful for any help.
  21. Hello, I just finished creating an environment for my STM32F4 kit using code sourcery over eclipse using this tutorial. I however get the following error when I compile the LED blink project. main.c:68: undefined reference to `RCC_AHB1PeriphClockCmd' main.c:77: undefined reference to `GPIO_Init' main.c:78: undefined reference to `GPIO_Write' I made sure I included all the include files in the "path and symbols" section in eclipse. Am I missing anything? Thanks for reading.
  • Create New...