| Author |
Message |
|
|
Posted: Feb 01, 2010 - 11:46 AM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Hello all,
I am trying to get the Virtual COM port running on Raven AVR original firlware in order to work with the SDK, however when I finished installling the .inf file I get the error code 10, saying "the device can't be started"
Does anyone have some hints how to over come this problem, I have been spending far too much time on this now. If you have any hints I would really appreciate it.
thanks
su |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 12:49 PM |
|


Joined: Apr 15, 2009
Posts: 4857
Location: San Jose, CA
|
|
| By original SDK do you mean BitCloud SDK? |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 01:01 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Yes
original Bitcould SDK! I was following AVR2052: BitCloud Quick Start Guide and trying to run WSNDemo application. I got stuck with com port section 8.1.4 sub section 3-(Install USB to Serial Converter driver)
thanks |
Last edited by swardfox on Feb 01, 2010 - 01:12 PM; edited 1 time in total
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 01:08 PM |
|


Joined: Apr 15, 2009
Posts: 4857
Location: San Jose, CA
|
|
|
swardfox wrote:
Yes original Bit could SDK!
What happens when you program BitCloud_ATAVRRZRAVEN_1_7_0/Evaluation Tools/WSNDemo (Embedded)/WSNDemoApp_USB_C_1.hex into UZB Stick? |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 01:22 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Now it works! sorry me being stupid that I did not upgrade the firmware before!
I could see the COM port now. and I will try and move forward now.
thank you very much for your help. you just saved my day! |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 01:25 PM |
|


Joined: Apr 15, 2009
Posts: 4857
Location: San Jose, CA
|
|
|
swardfox wrote:
Now it works! sorry me being stupid that I did not upgrade the firmware before!
I could see the COM port now. and I will try and move forward now.
thank you very much for your help. you just saved my day!
USB Sticks come with no software preprogramed (at least without BitCloud). |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 04:38 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Hello Alex,
sorry to bother you again. I can't find the WSNDemoApp_Raven_3290P_LCD.hex for Atmega 3290p on the bit could folder (but the user guide is giving me a confusing message) I uploaded images to the 1284p and the usb stick. when I turn the raven on I get the message "wait for M1284"
Could you give me some lead to run the Bit could WSNDemo please on Raven please.
thank you
su |
|
|
| |
|
|
|
|
|
Posted: Feb 01, 2010 - 04:57 PM |
|


Joined: Apr 15, 2009
Posts: 4857
Location: San Jose, CA
|
|
|
swardfox wrote:
I can't find the WSNDemoApp_Raven_3290P_LCD.hex
This file is from original Raven Software (the one that should be programed from factory).
You can find sources for it under BitCloud/Components/BSP/RAVEN/AT3290P. Compile it yourself, I don't know why it is not in SDK. |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 04:06 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
hello Alex,
It took me long time to get it working because for some reason one of the RAVENs stoped working. it just blinks the red LED behind the LCD, and nothing appears on the screen either. So I had to get a new raven now!
Anyway, SDK works now, but It only works with compliled "BitCloud/Components/BSP/RAVEN/AT3290P" not with the factory programed firmware for 3290p.
Thanks for the tip!
Still have one issue to address;
the temperature is zeros, i do not know why!
cheers |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 04:35 PM |
|


Joined: Apr 15, 2009
Posts: 4857
Location: San Jose, CA
|
|
|
swardfox wrote:
Still have one issue to address;
the temperature is zeros, i do not know why!
As far as I remember temperature sensor is connected to the same pins as JTAG port. In order to get it working you have to disable JTAG via fuse bit. BE CAREFUL!!! You'll have to program device via SPI which is on a different connector. Check that it is soldered and working before disabling any fuses. |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 05:05 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Well,
I had the same problem with the original firmware, (factory installed) it did not show the right temperature! I then disabled the debugging option using the joystick on the raven board, then it started to give me the right temperature!
I also had some bad experiance with this ISP connector! but I will try if it is the only way!
Mate, thanks a lot for you input!
cheers |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 06:22 PM |
|


Joined: Jun 15, 2008
Posts: 1755
Location: North Carolina USA
|
|
| I forget exactly how the joystick enables temperature (and disables jtag) but it still allows jtag programming with my Dragon. At first the connection fails but it asks "do you want to try external reset", answer yes and jtag is enabled again. |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 06:54 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Yes, I remember "do you want to try external reset" bit, this makes sense now. But I manually disabled the JTAG interface on the fuse settings once, and I had to spend few good days with it to use ISP to enable the JTAG interface. I am wondering is there a way to disable the debugging option in the firmware or something like that? since Bit could WSNDemo has no access to the joystick? I m now stuck here!
thanks for hints so far! |
|
|
| |
|
|
|
|
|
Posted: Feb 09, 2010 - 10:12 PM |
|


Joined: Jun 15, 2008
Posts: 1755
Location: North Carolina USA
|
|
| Here you go, this is from contiki 3290p firmware:
Code:
/**
* \brief This will enable or disable the JTAG debug interface to allow for
* proper temperature sensor readings.
*
* \param val Flag to trigger the proper debug mode.
*/
void
menu_debug_mode(uint8_t *val)
{
uint8_t sreg = SREG;
cli();
if(*val){
/* Disable - Could use inline ASM to meet timing requirements. */
MCUCR |= (1 << JTD);
MCUCR |= (1 << JTD);
/* Needed for timing critical JTD disable. */
temp_init();
/* Store setting in EEPROM. */
eeprom_write_byte(EEPROM_DEBUG_ADDR, 0xFF);
}
else{
/* Enable - Could use inline ASM to meet timing requirements. */
MCUCR &= ~(1 << JTD);
MCUCR &= ~(1 << JTD);
/* Store setting in EEPROM. */
eeprom_write_byte(EEPROM_DEBUG_ADDR, 0x01);
}
SREG = sreg;
}
Code:
/**
* \brief This will initialize the digital IO and adc channel for temperture readings.
*
* \retval 0 Place holder for returning status.
*/
int
temp_init(void)
{
/* Disable the Digital IO for the analog readings. */
DIDR0 |= (1 << ADC4D);
/* Temp sens power pin as output */
TEMP_DDR |= (1 << TEMP_BIT_PWR);
/* Power off temp sensor */
TEMP_PORT &= ~(1 << TEMP_BIT_PWR);
/* Temp sens input, no pullup */
TEMP_DDR &= ~(1 << TEMP_BIT_IN);
TEMP_PORT &= ~(1 << TEMP_BIT_IN);
temp_initialized = true;
return 0;
}
|
|
|
| |
|
|
|
|
|
Posted: Feb 11, 2010 - 05:14 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Hello,
Thanks for the code, However, while going through the "BitCloud/Components/BSP/RAVEN/AT3290P" code, I found out that the getting temperature from the sensor is not implemented in this code! I could not find anywhere the temperature table or init temp function or so.
The other thing is the temperature value is set to 0 by WSNDEMO/src/Sensormanager.c (WSNDemo code for the 1284P chip)
Quote:
WSNDEMO/src/Sensormanager.c
"void appGetSensorData(void (*sensorsesGot)(void))"
Now,
I think I would have to read the temperature from the sensor and stablish the serial communication between 1284p and 3290p in order to send the temperature value to 1284p, so that I can send it through the network.
I need some hints where to start now! if anyone could give me some quick guide or some hints that will be highly appreciated.
Thanks for the help so far, and I am learning a lot!
su |
|
|
| |
|
|
|
|
|
Posted: Feb 11, 2010 - 10:29 PM |
|


Joined: Jun 15, 2008
Posts: 1755
Location: North Carolina USA
|
|
Well here is how contiki does it:
http://contiki.cvs.sourceforge.net/viewvc/contiki/contiki-2.x/platform/avr-ravenlcd/
temp.c and temp.h are the temp measurement routines along with adc.c and adc.h. That also has a reading of ADC2 which is the external power supply voltage. The other files have the serial send to the 1284p.
Be aware the temp reads as zero if the Dragon stays connected to the JTAG header, even when JTAG is disabled. |
|
|
| |
|
|
|
|
|
Posted: Feb 12, 2010 - 09:09 AM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Thanks a lot,
I will give it a go today.. |
|
|
| |
|
|
|
|
|
Posted: Feb 12, 2010 - 05:41 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
Okay, I have a understanding now what to do I think.
The temperature is read. Now as far as I understand this, I would have to use UART to send the data to 1284. there is a UART connection in the contiki code already, my question is can I use the same connection ?
and also how would I get the data out from 1284p side?
I am sorry, I just learning and I have not done something like this before! (serial communication between microchips).
thanks
su |
|
|
| |
|
|
|
|
|
Posted: Feb 12, 2010 - 07:30 PM |
|


Joined: Jun 15, 2008
Posts: 1755
Location: North Carolina USA
|
|
| I don't have the bitcloud SDK but it probably has a similar serial link where commands are defined as the first byte and the rest is payload. Certainly the 1284p is telling the 3290p what LCD segments to turn off and on. But I don't know if the reverse is implemented, the 3290p sending anything to the 1284p. If so, define your own commands and payloads on the sending side, and add them to the case statement on the receiving side. |
|
|
| |
|
|
|
|
|
Posted: Feb 13, 2010 - 05:54 PM |
|

Joined: Oct 30, 2009
Posts: 22
|
|
hello mate,
Ok, I have been reading some stuff today, and I am getting an idea how to do it I think, I will try a small program possibly next week.
I was told by Atmel, they would resease the new Bit Cloud version with the temperature reading available next week. I am gonna wait a bit till it is released, in the mean time I would try and do other stuff, which is related to reading and storing of these data in a database! Thanks so far, will let you know how it goes!
cheers |
|
|
| |
|
|
|
|
|