Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

tma

Member Since 29 Mar 2012
Offline Last Active Aug 09 2013 07:59 PM
-----

Topics I've Started

Proprietary Netduino2 PCB - Loading Program

01 August 2013 - 05:04 AM

I have built a proprietary Netduino2-based PCB, running the STM32F205RGT6 processor.

V4.2 firmware loaded correctly, the board is recognized as Netduino and I was able to load the first test program from Visual Studio.

 

But now I cannot load any other program anymore, I get the infamous "Unable to communicate with device" message.

 

The PCB doesn't contain any circuitry to reset the board when Visual Studio starts communicating with the board. Am I missing something?

Does anybody know if there is an additional handshake or reset taking place when uploading programs via USB than just USB communication?


I2C With Triple Axis Accelerometer - MMA8452Q

26 December 2012 - 05:05 PM

I have attached a Triple Axis Accelerometer Breakout - MMA8452Q from Sparkfun, https://www.sparkfun.../products/10955 to a Netduino board.
The physical connection seems to work, as well as writing and reading - the only problem, I cannot set the register to read from.

 

Following are some parts of the code I wrote:
 
[font="'courier new', courier, monospace;"] // Freescale MMA8452Q[/font]
[font="'courier new', courier, monospace;"]            I2CDevice.Configuration Conf = new I2CDevice.Configuration(0x1D, 50);[/font]
[font="'courier new', courier, monospace;"]            I2CDevice icD = new I2CDevice(Conf);[/font]
[font="'courier new', courier, monospace;"]            byte[] data = new byte[7];[/font]
 
[font="'courier new', courier, monospace;"] // Set Device Active  (This part works correctly)[/font]
[font="'courier new', courier, monospace;"]            I2CDevice.I2CTransaction[] writeTransaction = new I2CDevice.I2CTransaction[][/font]
[font="'courier new', courier, monospace;"]                {[/font]
[font="'courier new', courier, monospace;"]                    I2CDevice.CreateWriteTransaction(new byte[] {0x2A, 0x01})[/font]
[font="'courier new', courier, monospace;"]                };[/font]
[font="'courier new', courier, monospace;"]            int bytesWritten = icD.Execute(writeTransaction, 50);[/font]
 
[font="'courier new', courier, monospace;"]  // Try to read Device ID  (This part does not work correctly)[/font]
[font="'courier new', courier, monospace;"]            I2CDevice.I2CTransaction[] rwtransaction = new I2CDevice.I2CTransaction[2] [/font]
[font="'courier new', courier, monospace;"]                {[/font]
[font="'courier new', courier, monospace;"]                    I2CDevice.CreateWriteTransaction(new byte[1] { 0x0D }),[/font]
[font="'courier new', courier, monospace;"]                    I2CDevice.CreateReadTransaction(data)[/font]
[font="'courier new', courier, monospace;"]                 };[/font]
[font="'courier new', courier, monospace;"]            int bytesRead = icD.Execute(rwtransaction, 50);[/font]
[font="'courier new', courier, monospace;"]            Debug.Print(ByteToInt(data[0]).ToString());[/font]
 
It seems that the read register is not set to 0x0D, but that it is set to 0X00, hence the byte array "data" contains the content of the registers starting at 0X00.
 
Has anybody made the same experiences and found a way how to address this?
 
Thanks

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.