Flash WSN image to ATmega128RFA1,serial output is garbled

Go To Last Post
17 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, everyone,

Today I use AVR Studio to flash WSNDemo image to ATmega128RFA1. It shows programming successfully.

But the serial output is garbled.

Before flashing, everything is ok.

I'd like to learn how to flash image and add codes to understand WSN project easier.

the serial baud rate is 38400,
8bit data,
1bit stop bit,
non parity

the WSN image is WSNDemo_Stk600_Atmega128rfa1_Coord.hex(BitCloud_MEGARF_1_12_0\Evaluation Tools\WSNDemo (Embedded))

Any idea about this?

Attachment(s): 

Last Edited: Fri. Oct 16, 2015 - 12:48 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You entered the .hex file name in both flash and eeprom fields. I don't know that example but assume there exists a separate .eep file for eeprom. When you erase before programming the flash, eeprom will also be erased since the EESAVE fuse is not checked.

Also you can avoid misery by saving the original fuses, .hex and .eep from the chip so you go back to the working firmware. Read them into as_working.hex and .eep, verify against those saved files, read the fuses, and then make an .elf file that can reprogram everything at once. But that can not be done if the lockbits were set, then all you can do is a full erase.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

dak664 wrote:
You entered the .hex file name in both flash and eeprom fields. I don't know that example but assume there exists a separate .eep file for eeprom. When you erase before programming the flash, eeprom will also be erased since the EESAVE fuse is not checked.

Also you can avoid misery by saving the original fuses, .hex and .eep from the chip so you go back to the working firmware. Read them into as_working.hex and .eep, verify against those saved files, read the fuses, and then make an .elf file that can reprogram everything at once. But that can not be done if the lockbits were set, then all you can do is a full erase.

Every time,I only program .hex to Flash.
Unfortunately, I don't save the original successful image.
Is there anyone have the fuse configuration for WSNDemo?

I just try WSNDemo image(in the directory-BitCloud_MEGARF_1_12_0\Evaluation Tools\WSNDemo (Embedded))
And my fuse configuration is 0xff,0x99,0x62
platform: STK600+ATMega128RFA1
Thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What do you mean by "garbled"? WSNDemo outputs binary data to be interpreted by WSN Monitor.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
What do you mean by "garbled"? WSNDemo outputs binary data to be interpreted by WSN Monitor.

I connect STK600 and PC via seiral and flash WSNDemo image to ATMega128RFA1.

WSNDemo will send message to PC via serial periodly. And I use serial terminal monitor tool like hyperterminal to detect the COM PORT. but receive garbled message.

I guess there maybe something wrong with fuse parameter?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As suggested by Alexru, install WSN Monitor Program because the binary values sent by WSN demo is not for user to interpret directly but for the WSN Monitor program to interpret and show the network with some other information.

-Krishna Balan S

-------------------------------------------------------------------------

"Heroes are ordinary people with extraordinary commitment"

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

krishnabalan wrote:
As suggested by Alexru, install WSN Monitor Program because the binary values sent by WSN demo is not for user to interpret directly but for the WSN Monitor program to interpret and show the network with some other information.

Yes, it is my misunderstanding . Now it works well:)

thanks.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
What do you mean by "garbled"? WSNDemo outputs binary data to be interpreted by WSN Monitor.

Thanks.

WSNDemo is a good example to learn how to use UART.

I has added the function of UART to Blink project and it works well.

It will be very helpful for me to learn BitCloud.

Next step ,I plan to study WSNDemo's network fucntion and hope to add the function that end device can join the network without knowing coordinator's MAC address.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It already does so by default.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
It already does so by default.

hi,alex

which file should I read ,if I'd like to see the details including registration procedure? It should be implemented in BitCloud stack(APS/NWK)?

I readed the WSNDemo codes. It seems that the coordinator just transfer what it have received by zigbee network to WSNMonitor on PC via serial port.

But I didn't know how the end device register in the level of stack.

many thanks.

scott.yang

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ED calls ZDO_StartNetworkReq() and joins to any device in the network with extended PAN ID equal to CS_EXT_PAN_ID (set in configuration file). If CS_EXT_PAN_ID is equal to 0 then it joins to any network around.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

alexru wrote:
ED calls ZDO_StartNetworkReq() and joins to any device in the network with extended PAN ID equal to CS_EXT_PAN_ID (set in configuration file). If CS_EXT_PAN_ID is equal to 0 then it joins to any network around.

ED calls ZDO_StartNetworkReq to join network.

Then how does Coordinator know if new ED joined network?

I notice that the function of ZDO_MgmtnwkupdateNotf has been implemented in WSNDemoApp.c. Does this function can notify coordinator that the new ED has joined the network with the parameter of ZDO_CHILD_JOINED_STATUS?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

scott.yang wrote:
Then how does Coordinator know if new ED joined network?
This call causes a lot of activities, including searching for potential parent and sending join request.

scott.yang wrote:
I notice that the function of ZDO_MgmtnwkupdateNotf has been implemented in WSNDemoApp.c. Does this function can notify coordinator that the new ED has joined the network with the parameter of ZDO_CHILD_JOINED_STATUS?
Yes. But keep in mind, this notification will be called on the parent, and it is not necessarily a coordinator, it may be any router in the network.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

  I have two STk600-Atmega128RFA1 boards. i have programmed  one board, but i can't program the second one. While reading it shows " Unable to enter programming mode" and in that board one red LED continuously glowing. I have checked the jumper(J10) connection but still the problem occurs. can anyone help please?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What LED is glowing? 3.5V seems to high. How do you power your board?

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi alexru,

          I don't have the STK600 base board. So i give power by some external own board we have.If it seems to high means, how much voltage i can give to my board? can you please give the range. I give 3.5v because of the micro controller range between 1.8-3.6V. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It is not about how much you can give. Typical power supply voltage for those systems is is 3.3v.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.