CW2's Content - Netduino Forums - Page 3
   
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.

CW2's Content

There have been 148 items by CW2 (Search limited from 17-June 23)


By content type

See this member's


Sort by                Order  

#60476 Receiving Junk from Serial Port

Posted by CW2 on 20 October 2014 - 04:03 PM in Netduino Plus 2 (and Netduino Plus 1)

the voltage to the reader is supplied by an external power source and its the correct voltage, If I take the reader and connect a DB9 pin on it, connect to my pc and present my tag to it, it will spit out the correct values in HyperTerminal.

 
I think there is still some misunderstanding - the external power source does not directly relate to RS-232 (serial) line signal levels. If the reader works when directly plugged into PC (DB9), this means it uses ±10-15 V signals and that is why it does not work with Netduino, which requires 0/3.3..5V ("TTL UART").
 
Technical note: RS-232 transceivers usually have voltage boosting 'charge pumps' to convert supply voltage, e.g. 5V to +10..15V and -10..-15V required by the transmission line.

 

On a side note, If I purchase this reader (Link below) Can I connect this directly to netduino and read my tag code ?
http://netram.co.za/...odule-uart.html

 
Most likely yes, there is "UART TTL interface" in the feature list.




#60469 Receiving Junk from Serial Port

Posted by CW2 on 20 October 2014 - 06:24 AM in Netduino Plus 2 (and Netduino Plus 1)

I am connecting my serial rs232 device to the netduino plus 2, D0 and D1 and GND. The device is a card reader.

 
Is the card reader designed to be plugged directly into PC serial port? If yes, then you are missing a level shifter (standard RS232 voltages are around ±10 .. 15V, while Netduino requires 3.3 .. 5V).




#60472 Receiving Junk from Serial Port

Posted by CW2 on 20 October 2014 - 07:54 AM in Netduino Plus 2 (and Netduino Plus 1)

What card reader are you using?

Most RS-232 devices that you simply plug into PC serial port do not work with microcontroller boards such as Netduino, due to different voltage on RX and TX lines, they require a special circuitry called 'level shifter', for example based on MAX232 or its numerous variants.

 

Basically, there are three major reasons for invalid/garbled data on the serial line: missing level shifter, switched TX/RX lines or incompatible baudrate settings (the latter two require repeated verification, even in case you are thousand percent sure they are correct and you've already checked it a dozen times ;).




#61163 Non-Voliatile Storage - NVRAM

Posted by CW2 on 05 January 2015 - 03:36 PM in Netduino Plus 2 (and Netduino Plus 1)

I want to see anyone build the firmware without a $6000 tool chain.  Be sure to take notes and share.

 

Well, it is possible to build the firmware with GCC, I have been doing that for years, and so were others. The only challenge is Netduino Plus firmware, due to the size of default C runtime libraries (newlib) - it now can be solved with newlib-nano from GCC Tools For ARM Embedded Processors - yes, it requires rebuilding the toolchain, to enable support for 64-bit integers, but it is trivial change in the configuration script and only a few hours wait...




#61164 Non-Voliatile Storage - NVRAM

Posted by CW2 on 05 January 2015 - 03:43 PM in Netduino Plus 2 (and Netduino Plus 1)

I am betting you need something like the DDK for doing this or hack this. I find it hard to believe that it does not exist already as an assembly or namespace

 

You just need to call one function to update the flash memory contents (it requires a few steps to initialize certain registers and properly aligned and timed access, a little bit different than direct peek/poke). The NETMF itself uses that, e.g. during deployment, no need to implement anything but a simple wrapper to expose it. There is already such functionality implemented in Valkyrie-MT's settings feature, see his repo.




#61168 Non-Voliatile Storage - NVRAM

Posted by CW2 on 05 January 2015 - 06:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Well, building NETMF firmware requires some effort - it is certainly not on the same comfort level as F7/Ctrl+B in Visual Studio, but I can ensure you it is still a piece of cake in comparison to other [embedded] projects I've had a chance to work with. And the real fun comes much later, when you need to F10 in native code  :P
 

Still waiting on detailed notes .......

 
Please have a look at Netduino 2 Firmware v4.3.1 with GCC support. There are similar topics and wiki articles (by other community members) for basically all Netduino firmware variants.

 

Regarding Netduino Plus, technically it was possible to build the firmware with GCC, but due to the size of its C Runtime libraries and flash memory consumed by networking code, either some of the features had to be removed or the flash region dedicated to user application had to be significantly reduced. After release of newlib-nano - an optimized C Runtime, a part of GNU Tools for ARM Embedded Processors - in December 2012, the code produced by GCC is on par with Keil MDK (formerly ARM RVDS) output, in fact I was able to get even smaller output in certain cases (optimized compiler and linker switches for Cortex-M Thumb code generation).

 

The other issue with GCC was that after introduction of Cortex-M port, there were wrong build settings and interrupt-related code that did not work correctly for Thumb instruction set - this was fixed and published in 2012 (unfortunately, the repository has been deleted, but the code is included in newer releases).

 

Hope this helps.




#57800 Two's compliment byte array to int16 - confusing results.

Posted by CW2 on 28 April 2014 - 07:21 AM in General Discussion

For the serial number it says I will get back a 4 byte array which is the equivalent of this:
byte[] buff = new byte[8] { 0x00, 0x01, 0x36, 0xeb, 0x00, 0x0c, 0x45, 0xe3};
The number I am looking for is 79595 (real serial number of the camera)


Well, there is obviously an error in the documentation or you've pasted incorrect code - it says 4 byte array, yet it has 8 bytes. The number you are looking for 79595 is the first four bytes in the array: 
int serialNumber = (int)(buff[3] | (buff[2] << 8) | (buff[1] << 16) | (buff[0] << 24));
// 0xEB | 0x3600 | 0x010000 | 0x00 = 0x0136EB = 79595



#60711 Netduino Plus 2 SPI Possible Speeds?

Posted by CW2 on 14 November 2014 - 10:46 AM in Netduino Plus 2 (and Netduino Plus 1)

The prescaler values are just for the SPI modules, SPI_CR1 register bits BR0..BR2.




#60744 Netduino Plus 2 SPI Possible Speeds?

Posted by CW2 on 18 November 2014 - 02:48 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, you should be able to lower peripheral clock speed by adjusting the bus clocks frequencies. But, when you start playing with PLL settings, keep in mind that the USB FS module requires 48 MHz clock to operate properly.




#60696 Netduino Plus 2 SPI Possible Speeds?

Posted by CW2 on 12 November 2014 - 04:20 PM in Netduino Plus 2 (and Netduino Plus 1)

There are three SPI modules on Netduino Plus 2 microcontroller connected to two system busses: SPI1 on APB2, SPI2 and SPI3 on APB1. The bus frequencies are 42 MHz and 84 MHz and 3 bit prescaler is /2, /4, ... /256, which gives the following clock speeds:
Prescaler APB1      APB2
          42000000  84000000
    2     21000000  42000000 
    4     10500000  21000000
    8      5250000  10500000
   16      2625000   5250000
   32      1312500   2625000
   64       656250   1312500
  128       328125    656250
  256       164062    328125
I guess the firmware selects speed closest to the above values, the actual code is
    UINT32 clock = SYSTEM_APB2_CLOCK_HZ / 2000; // SPI1 on APB2
    if (Configuration.SPI_mod != 1) clock = SYSTEM_APB1_CLOCK_HZ / 2000; // SPI2/3 on APB1
    if (clock > Configuration.Clock_RateKHz << 3) {
        clock >>= 4;
        cr1 |= SPI_CR1_BR_2;
    }
    if (clock > Configuration.Clock_RateKHz << 1) {
        clock >>= 2;
        cr1 |= SPI_CR1_BR_1;
    }
    if (clock > Configuration.Clock_RateKHz) {
        cr1 |= SPI_CR1_BR_0;
    }
    spi->CR1 = cr1;
where SPI_CR_BR_0..2 are prescaler bits (or-ed to give 0..7).



#59190 Netduino Plus 2 : double.ToString failing on home built firmware 4.2.2

Posted by CW2 on 13 July 2014 - 11:15 AM in Netduino Plus 2 (and Netduino Plus 1)

If I remember it correctly, Yagarto comes with libraries that do not have support for double (and 64-bit integers, so long.ToString() does not work correctly either). You'd need to build custom toolchain with newlib configuration options --enable-newlib-io-long-long and --enable-newlib-io-long-double.

 

Alternatively, you can use GCC Tools for ARM.




#59936 Maximum port frequency ...

Posted by CW2 on 29 August 2014 - 01:21 PM in Netduino Go

So, I'm not going to be able to create any kind of radio signal by toggling a port on the Netduino ... at least not in the amateur bands (2 meter band). That would require about 145 MHz.

 

You should have mentioned that in the original post - Shield Base has STM32F205 microcontroller that runs at 120 MHz, Netduino Go STM32F4 at 168 MHz. So, not enough for 145 MHz pin toggling even when done in assembly...




#60257 Help! I've accidentally bricked my brand-new Netduino 1 when updating...

Posted by CW2 on 27 September 2014 - 09:01 PM in Netduino 2 (and Netduino 1)

What guide are you following? ST tools do not work with Netduino 1, you have to use Atmel SAM-BA.




#61509 Help me out with SPI Please.

Posted by CW2 on 04 February 2015 - 10:06 AM in Netduino 2 (and Netduino 1)

I don't know what else I must do to get the lcd working on this hardware.

 

Could you post a photo of the actual wiring?




#59351 Serial Issues

Posted by CW2 on 23 July 2014 - 01:48 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you sure the RS232 port on your PC is 5V? Usually, they are standard ±12V; and "5V" RS232 can also mean ±5V (and not 0 - 5V). Netduino has 3.3V logic (inputs in digital mode are 5V tolerant), so you'd need a level converter to connect it to PC.




#59349 Serial Issues

Posted by CW2 on 23 July 2014 - 01:32 PM in Netduino Plus 2 (and Netduino Plus 1)

What cable do you use to connect Netduino Plus 2 to the PC? Could it be faulty (e.g. cheap USB converter)?
 
Also, does the data table in your original message mean that Netduino receives character with ASCII value 6 for the original '0' character, ASCII 103 for '1' etc.? If not, what data are you sending?




#59395 Netduino Unique ID

Posted by CW2 on 25 July 2014 - 02:04 PM in Netduino 2 (and Netduino 1)

Yes, that's right - the EEPROM can be changed that way. There is no exact equivalent of the microcontroller Unique ID feature (which cannot be changed, because it is in ROM), so you'd have to use modified firmware.




#59387 Netduino Unique ID

Posted by CW2 on 25 July 2014 - 12:13 PM in Netduino 2 (and Netduino 1)

Yes, MAC address can be changed.

 

The Netduino 2/Plus 2 microcontroller has unique ID feature, unfortunately it is not available in the current firmware, mostly due to privacy concerns (it has been already discussed several times on this forum). You can modify the firmware or you can use another device to store unique ID, such as EEPROM (small memory chip, interfaced from Netduino through SPI or I2C).




#59368 Netduino Unique ID

Posted by CW2 on 24 July 2014 - 01:49 PM in Netduino 2 (and Netduino 1)

What scope of uniqueness are you referring to?
 
The SKU determines the Netduino model:

  • 0x1000 (4096) ... Netduino,
  • 0x1001 (4097) ... Netduino Plus,
  • 0x1002 (4098) ... Netduino Mini,
  • 0x1003 (4099) ... Netduino Go,
  • 0x1004 (4100) ... Netduino Shield Base,
  • 0x1005 (4101) ... Netduino 2,
  • 0x1006 (4102) ... Netduino Plus 2.

The number is stored in the flash memory and the current firmware does not expose flash memory routines to user application, so in this context it cannot be changed programmatically. Technically, it is possible to customize the firmware to enable access to flash memory routines from the user application (managed code) and there are other programs that can be used to modify flash memory contents, such as MFDeploy, JTAG/SWD programmer etc.

 

Firmware update does not change SKU, unless you deliberately flash firmware for different SKU - e.g. it is possible to have Netduino firmware running on Netduino Plus (of course Plus-specific features do not work).




#57989 Commercial Product using Netduino - not competitive

Posted by CW2 on 07 May 2014 - 11:01 AM in General Discussion

You might also want to check out this interesting alternative to STM micros: 32-bit ARM MCUs by Spansion, .NET MF port on CodePlex (via GHI forums). Not sure about the availability, though.




#57969 Commercial Product using Netduino - not competitive

Posted by CW2 on 06 May 2014 - 04:31 PM in General Discussion

Well, you cannot really compare a $5 PIC with a STM32F Cortex microcontroller - which costs ~$10 - $20 in single quantities, depending on the model and variant. So, you'd need to select an appropriate microcontroller, there are many of them even in STM families and then reduce cost by mass production - but we are talking hundred of thousands here and even then you'd probably have hard time to meet your $10 goal. For example, Netduino 2's STM32F205RFT6 costs ~$7 in 1000 quantity, plus crystal, passives, other components, PCB, assembly, testing etc...




#57991 Commercial Product using Netduino - not competitive

Posted by CW2 on 07 May 2014 - 11:35 AM in General Discussion

I think after funding $1M+ to Secret Labs there will be no alternatives to STM32 in NETMF ;)

 
The AGENT watch does not use ST micro, but Atmel (SAM4S, and a secondary tinyAVR)  :P




#58774 .NET MF v4.Next

Posted by CW2 on 19 June 2014 - 06:19 AM in General Discussion

Also some details about Visual Studio 2013 support (issue #2516):
 

Support for VS2013 is under development. We'll have some more details and a test build shortly. The general goal is to not require firmware updates (which makes things tricky due to how the current build does version numbering for everything on mass) Furthermore, the current setup is designed to support only one version of VS at a time. While this was mostly acceptable when VS relased on a cadence on the order of ~3years, now that they are on an apparently annual cadence that's not going to fly. So we are seperating out the core reference libraries, build infrastructure etc... from the VS integration. For the VS integration we'll be going to VSX extensions in the gallery (Same for samples). Thus, the experience becomes much more consistent with other platforms that VS targets. While enabling VS2012 AND VS2013 support. (ditto for VS14 CTP and beyond)




#58795 .NET MF v4.Next

Posted by CW2 on 20 June 2014 - 06:30 AM in General Discussion

For me, the most interesting is the separation of Visual Studio integration component, which is probably the only thing anyone else will not be able to do (only Microsoft signed extensions allowed in Express SKUs). If they do it right, say it allows to completely replace the core assemblies, I will be very happy...




#58769 .NET MF v4.Next

Posted by CW2 on 18 June 2014 - 09:31 PM in General Discussion

Something is happening on netmf.codeplex.com...
 

ACCESS PERMISSIONS UPDATE:
2014 Jun 16
In preparation for the longer term future of .NET MF we are in the process of some changes to the use of CodePlex. (Including switching to a GIT repository model to make things easier for a true OSS development process). As part of this transition everyone's permissions were reset to "editor" status, thus denying check-in permissions on the TFS tree. Fear not! This isn't a permanent change. We'll have more details on the results of the changes and the process for contributing into the official repositories in the very near future so stay tuned.

-Steve Maillet
Senior Architect .NET Micro Framework


Planned release .NET MF v4.Next
 
 
Now only if anyone know what "very near future" means - is it sooner or later than [the usual] "soon"  ;)




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.