cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 and WiFi chip

tkjmail
Associate II
Posted on January 11, 2010 at 19:09

STM32F103 and WiFi chip

15 REPLIES 15
tkjmail
Associate II
Posted on May 17, 2011 at 13:36

The TCP/IP Protocol, if that's target dependant, then I won't be able to port that with ease?

[ This message was edited by: tkjmail on 11-01-2010 09:42 ]

st3
Associate II
Posted on May 17, 2011 at 13:36

''Target independent'' means that it does not depend upon any specific target; ie, it is portable

tkjmail
Associate II
Posted on May 17, 2011 at 13:36

Sorry, missed the ''in-'' ;)

st3
Associate II
Posted on May 17, 2011 at 13:36

The key to writing Portable code is to never use any feature that relies upon any specific tools, environment, or target hardware.

In practice, of course, this is impossible.

In practice, you need to make sure that you make no direct use of any specific tool, environment, or target hardware features.

Instead, you must ''encapsulate'' all dependencies in easily isolated forms.

A prime example of this is the way that the ST Firmware Library never uses the standard 'C' int, char, or other types; instead, it defines u8, s16, etc - thus it is not dependent on how a particular compiler implements the standard 'C' types.

Similarly, rather than coding reliance on any chip-specific features directly into all your code, you should provide generic ''drivers'' - so that only the ''drivers'' need to be changed to port the code to another chip.

eg, instead of accessing the SPI peripheral registers directly, provide generic functions like spi_write, spi_read, etc - then only the implementations of those functions need to be changed for a different chip!

Thus you would have an AVR-specific spi_read, spi_write etc for your AVR, and an STM32-specific spi_read, spi_write etc for your STM32 - and all the other code should just port unchanged!

If you haven't already written your AVR code in this portable manner - ie the whole code is full of dependencies on the AVR chip and the specific compiler, etc - then I suggest that you start by re-writing the AVR code to be portable.

Once you have portable code running on your AVR, it will be a lot easier to port it to the STM32.

st3
Associate II
Posted on May 17, 2011 at 13:36

Just seen this:

Quote:

Microchip Technology Acquires ZeroG Wireless

Deal Enables Embedded Wi-Fi® Solutions for PIC® Microcontrollers

CHANDLER, Ariz.--(BUSINESS WIRE)--Microchip Technology Inc. (NASDAQ: MCHP), a leading provider of microcontroller and analog semiconductors, today announced it has acquired ZeroG Wireless, Inc. (http://www.microchip.com/get/9B6V), an innovator in low-power embedded Wi-Fi® solutions based in Sunnyvale, Calif. ZeroG is a privately held fabless semiconductor developer of Wi-Fi-certified transceivers and FCC-certified modules, which further strengthen Microchip’s wireless offerings by enabling embedded designers to easily connect to this ubiquitous networking protocol with any 8-, 16- or 32-bit PIC® microcontroller. The terms of the deal are confidential.

http://www.businesswire.com/news/home/20100111005457/en/Microchip-Technology-Acquires-ZeroG-Wireless

tkjmail
Associate II
Posted on May 17, 2011 at 13:36

Thanks... I'll check that out - that should be possible to convert to some usable code for the STM32 (Ride7 IDE)