Can't compile samples from BitCloud (ZigBee) with WinAVR

Go To Last Post
986 posts / 0 new

Pages

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

EGTOGAMAT wrote:
I could manually clear the interrupt flag (touching direclty the interrupt bit) before enabling the interrupt. May I do this? (in the user guide is recommend not to access directly the mcu registers)

You should not touch global interrupt flag, it will mess data transmission/reception.

See how debounce is implemented in Components/BSP/buttons.c.

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

In Lowpower app I try change devices type from ED to Router. I change #ifdef _ENDDEVICE_ TO _ROUTER_ and set appDeviceType = DEVICE_TYPE_ROUTER;, update flash of Coordinator and second board, but this board don't connect to Coordinator :(

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

code-by wrote:
In Lowpower app I try change devices type from ED to Router. I change #ifdef _ENDDEVICE_ TO _ROUTER_ and set appDeviceType = DEVICE_TYPE_ROUTER;, update flash of Coordinator and second board, but this board don't connect to Coordinator :(

You should also set rxOnWhenIdle to true and remove all sleep-related code.

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

Now in LP sample node find network, but coordinator still don't send to 0xFFFF

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

code-by wrote:
Now in LP sample node find network, but coordinator still don't send to 0xFFFF

By default LP configured as

CS_MAX_CHILDREN_AMOUNT = 7
CS_MAX_CHILDREN_ROUTER_AMOUNT = 0

so coordinator won't allow to router to join. Did you changed this?

Is unicast to routers working?

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

Do I need use same message structure (for example AppMessageBuffer_t in LP sample) when send from C to ED and from ED to C or it can be diverse (of course with definitions of these two structures for each device)? I need to send from C to ED 4 int variables and from ED to C only 2 int variables.

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

code-by wrote:
Do I need use same message structure

You may send anything you like.

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

After modify configuration to
CS_MAX_CHILDREN_AMOUNT = 7
CS_MAX_CHILDREN_ROUTER_AMOUNT = 7
unicast to routers don't work (may be I don't change all that needs to be changed for this)

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

code-by wrote:
After modify configuration to
CS_MAX_CHILDREN_AMOUNT = 7
CS_MAX_CHILDREN_ROUTER_AMOUNT = 7
unicast to routers don't work (may be I don't change all that needs to be changed for this)

Later I'll try this and post results. May take couple of days though.

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

Here is the patch which demonstrates broadcast to routers based on low power application.

Attachment(s): 

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

Sometimes when I write string to USART for display in Hyperterminal, its not full displayed (only part of it) and continue to display only with next received message.
How to resolve this problem?

Attachment(s): 

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

code-by wrote:
Sometimes when I write string to USART for display in Hyperterminal, its not full displayed (only part of it) and continue to display only with next received message.
How to resolve this problem?

Peer2peer is written keeping specific logic in mind. You can not just pass 150 bytes string if sendDataToUsart() is not ready to take it. I am not able to predict what happens and have no time to debug your code.

If your application becomes way different from sample application you should start your own application from scratch implementing only logic you need.

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

What setting for "Flow Control" I need set for P2P sample (in BitCloud documentation I found "Flow Control" is "None", but in P2P sample appUsartDescriptor.flowControl = USART_FLOW_CONTROL_HARDWARE;

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

code-by wrote:
What setting for "Flow Control" I need set for P2P sample

Depends on what kind of flow control you need.

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

Sometimes not full string appear in Hyperterminal in Lowpower app. too (when one trigger message sending by button). What is recommended string length for send from board to PC?

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

code-by wrote:
Sometimes not full string appear in Hyperterminal in Lowpower app. too (when one trigger message sending by button). What is recommended string length for send from board to PC?

There is no "strings" when sending to UART. There are buffers which user must control how full they are and stop transmission.

To get reliable data transfer you need to use hardware flow control. But this must be supported by hardware itself (you need to have full cable with CTS/RTS lines).

What the steps to reproduce data loss in LowPower application? And what hardware do you use?

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

next

Last Edited: Wed. Oct 28, 2009 - 01:18 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I remove sleep and repeatable press message sending key.
I use meshbean WDB-A1281-A2 and USB cable (virtual com) from Meshnetic starter kit.

Attachment(s): 

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

code-by wrote:
I remove sleep and repeatable press message sending key.
I use meshbean WDB-A1281-A2 and USB cable (virtual com) from Meshnetic starter kit.

Show your changes to code. I believe original LowPower newer stops to send data so it must be something you have changed.

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:
EGTOGAMAT wrote:
Looks like this was the key element. I re-compiled with BitCloud 1.6 and after 24 hours everything is ok (using the same state machine)

Zero UID can not be directly connected to hangups. Anyway I am glad that problem solved.

As always you are right :)

I found the bug that cause the hang up.

I tried to force the COO to start a new PAN if it sends a message 3 times and no confirmation is received.
I did this by setting the state machine to INIT state which uses:
ZDO_StartNetworkReq(&networkParams);
The
static void ZDO_StartNetworkConf(ZDO_StartNetworkConf_t *confirmInfo)
is never called as COO is in ZDO_IN_NETWORK_STATUS .

1. How can I force the COO to (a) drop the current network and (2) start a new network? Should I use ZDO_ResetNetworkReq() ?

2. How can I chose the channel to be used when starting the network (CS_CHANNEL_MASK has only 8 digits while 2.4 GHz there are 13 channels)

Thanks

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

EGTOGAMAT wrote:
static void ZDO_StartNetworkConf(ZDO_StartNetworkConf_t *confirmInfo)
is never called as COO is in ZDO_IN_NETWORK_STATUS .

Yes. And actually it is considered a bug and will be fixed soon so it will be called with some error status :)

EGTOGAMAT wrote:

1. How can I force the COO to (a) drop the current network and (2) start a new network? Should I use ZDO_ResetNetworkReq() ?

You may. You also may issue ZDP Leave Request with dstExtAddr = 0.

EGTOGAMAT wrote:
2. How can I chose the channel to be used when starting the network (CS_CHANNEL_MASK has only 8 digits while 2.4 GHz there are 13 channels)

CS_CHANNEL_MASK is 32 bits. You may specify any specific channel or subset of channels.

Don't be confused by constructions like "(1L<<0x0f)" used in configuration files by default. This construction is 1 shifted 15 times left (15 channel).
You may use something like 0x00018000L (which is channel 15 and 16).

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:

EGTOGAMAT wrote:

1. How can I force the COO to (a) drop the current network and (2) start a new network? Should I use ZDO_ResetNetworkReq() ?

You may. You also may issue ZDP Leave Request with dstExtAddr = 0.

When using Reset everything blocks. I expected ZDO_ResetNetworkConf to receive ZDO_SUCCESS_STATUS == resetInfo->status but the callback fucntion is not executed.
The Leave Request is working perfectly.
alexru wrote:

EGTOGAMAT wrote:
2. How can I chose the channel to be used when starting the network (CS_CHANNEL_MASK has only 8 digits while 2.4 GHz there are 13 channels)

CS_CHANNEL_MASK is 32 bits. You may specify any specific channel or subset of channels.

Don't be confused by constructions like "(1L<<0x0f)" used in configuration files by default. This construction is 1 shifted 15 times left (15 channel).
You may use something like 0x00018000L (which is channel 15 and 16).


I modified the Configure file by changing:
CS_CHANNEL_MASK = "(1l<<0x7)"
and the device is reporting that mask is 0x0 and thus no PAN is created. It looks like somewhere there's an AND with (1L<<0x0f) and only channel 15 is being used.
If I set
CS_CHANNEL_MASK = 0x00018080L
I get the same results: NO PAN is created and mask is read from CS as 0x0.
I'm using:
- ZigBit 2.4 GHz Amp Module with U.FL Connector
- ZigBit 2.4 GHz Module with Dual Chip Antenna
- BitCloud_ZDK_Amp_1_6_0

Thanks

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

EGTOGAMAT wrote:

When using Reset everything blocks.

Possible bug. I'll look into it.

EGTOGAMAT wrote:

I modified the Configure file by changing:
CS_CHANNEL_MASK = "(1l<<0x7)"

For 2.4 GHz valid range of channels is 0x0b-0x1a.
Channels 0x01-0x0a are belong to 900 MHz range.

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

I notice that in the ZigBit 900 MHz kit datasheet
(http://atmel.com/dyn/resources/p...)
it is said that:

1. There are 15 channels at 2 MHz channel spacing. I think there is a small error because for European range (868 to 868.6) there are no 30 MHz available.

2. I see in the table in the parameter column 1000 kbit/s. I ran the ThroughputTest using the 900 MHz kit but I did not manage to reach this speed. How can I change PSDU size?

Thanks

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

EGTOGAMAT wrote:
1. There are 15 channels at 2 MHz channel spacing. I think there is a small error because for European range (868 to 868.6) there are no 30 MHz available.

It is better to refer to RF-chip datasheet for exact frequencies and channels. All this modes are a little bit complicated.

EGTOGAMAT wrote:
2. I see in the table in the parameter column 1000 kbit/s. I ran the ThroughputTest using the 900 MHz kit but I did not manage to reach this speed. How can I change PSDU size?

1000 kbit/s is Atmel's proprietary mode. It is not in 802.15.4 specification and not ZigBee compliant. BitCloud does not support it currently.

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

I try to set up the following flow (using 2.4 GHz devices):
- configure channel mask for COO for all channels: 0x03FF_FC00
- start a PAN. The PAN is started on channel 16.
- if no device connects I would like to change the channel mask to 0x0010_0000 (for example)
- restart the PAN (by using Leave Request method)

1. I notice that COO does not change the channel (each time a PAN is set up I check the startInfo->activeChannel information). So I have a COO working on channel 16 but having channel mask = 0x0010_0000 (it should be channel 11)

2. If the read the CHANNEL_MASK before changing it it reads ok: 0x03FF_FC00. If I read it after I tried to change it (using a UART command) the device returns 0x0010_0008. What does the 8 stand for?

3. What is the appropiate method for saving parameters between resets? (direct eeprom access is not recommended as far as I seen).

Thanks

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

EGTOGAMAT wrote:
1. I notice that COO does not change the channel (each time a PAN is set up I check the startInfo->activeChannel information). So I have a COO working on channel 16 but having channel mask = 0x0010_0000 (it should be channel 11)

0x0010_0000 = 1<<0x14, not 11 by any means.
I don't quite understand what are you doing. Can you post step-by-step guide along with actual and expected results?

EGTOGAMAT wrote:

2. If the read the CHANNEL_MASK before changing it it reads ok: 0x03FF_FC00. If I read it after I tried to change it (using a UART command) the device returns 0x0010_0008. What does the 8 stand for?

Stack never changes CHANNEL_MASK, only reads it, must be something wrong in your code. Check that you pass CS_CHANNEL_MASK_ID, not just CS_CHANNEL_MASK.

EGTOGAMAT wrote:

3. What is the appropiate method for saving parameters between resets? (direct eeprom access is not recommended as far as I seen).

PDS_WriteData() and PDS_ReadData() functions.

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

Is it possible to synchronize to a request confirmation ? For example, I do APS_AddGroupReq(), but I have many variables that I would like to use in the function that is calling the add group request.

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

lucicop wrote:
Is it possible to synchronize to a request confirmation ? For example, I do APS_AddGroupReq(), but I have many variables that I would like to use in the function that is calling the add group request.

No, it is impossible. Use global variables and unions help to save some space.

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

Thank you. I read that some function calls are synchronous, though. How can I know which call is synchronous, from the documentation or the code ?

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

lucicop wrote:
Thank you. I read that some function calls are synchronous, though. How can I know which call is synchronous, from the documentation or the code ?

If you can specify callback (such field exists in request) then call is asynchronous. Usually complex functions that require inter-layer interaction implemented in this way.

Simple functions (add entry to table etc) are synchronous.

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:

Can you post step-by-step guide along with actual and expected results?

In Configure file I have:
CS_CHANNEL_MASK = "(1l<<0xd)"

In my program I use global variables:
uint32_t channelMask = 0x03CFFF800;
uint32_t aux;

Before calling NetworkStartReq I set:
CS_Write(CS_CHANNEL_MASK, channelMask)

After this I read the channel mask:
CS_Read(CS_CHANNEL_MASK, aux);
printf("Channel_mask = %08lX", aux);

The value read is equal to the one I expect: 0x03CFFF800.

Network starts on channel 16.
This is ok, channel is random as mask covers more channels.

Next I change the CS_CHANNEL_MASK to (1l<<0xc).
I call the LeaveReq and then restart a new PAN.
The COO creates a new PAN on channel 16.
I expected the COO to start a PAN on channel 12.
When I read the Channel_Mask I got got the value:
[(1l<<0xc) | 0x8]

Ater
CS_Write(CS_CHANNEL_MASK, channelMask)
I added the code:
CS_Write(CS_CHANNEL_MASK_ID, (0x1l<<0xc))

and re-run the above scenario.Everything works perfectly meaning:
- I change the CH_CHANNEL_MASK and CS_CHANNEL_MASK_ID to (1l<<0xf)
- I force the COO to leave the PAN by using Leave_Request
- COO creates a new PAN channel 15 (this is what I expected).

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

EGTOGAMAT wrote:

CS_Write(CS_CHANNEL_MASK, channelMask)
CS_Read(CS_CHANNEL_MASK, aux);

You should pass CS_CHANNEL_MASK_ID to these functions. Without _ID you just write and read back to some arbitrary location.

EGTOGAMAT wrote:

When I read the Channel_Mask I got got the value:
[(1l<<0xc) | 0x8]

So first time you have written to location being used by stack and stack changed it.

EGTOGAMAT wrote:

CS_Write(CS_CHANNEL_MASK_ID, (0x1l<<0xc));

This is correct way to set parameters.

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

END_DEVICE_SLEEP_PERIOD = 0 means that coordinator will not check if device is still there and device will not poll for parent ?

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

lucicop wrote:
END_DEVICE_SLEEP_PERIOD = 0 means that coordinator will not check if device is still there and device will not poll for parent ?

No. It is invalid value. minimum reasonable value is 100.

Parent never pools for device, it is device who periodically polls it's parent. Parent only waits to be polled for a END_DEVICE_SLEEP_PERIOD*2 and if device does not show up in this period parent considers it lost and removes it from tables, forgets all data it had for this device.

So this parameters must be set and must be the same on all devices 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

Damn :) I thought I found the solution to my problem. So what could be done to put Zigbee on a key fob that will probably be missing for long periods from the base station's surroundings ?

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

lucicop wrote:
Damn :) I thought I found the solution to my problem. So what could be done to put Zigbee on a key fob that will probably be missing for long periods from the base station's surroundings ?

What the purpose of fob?

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

In Lowpower sample (stack 1.6) I try to add another int to message structure:

typedef struct
{
AppSensorType_t type;
int16_t value;
int16_t value2;
} PACK AppSensorMessage_t;

When I add its value for sending

appMessageBuffer.msg.report.value2=100;

board is hang while sending message (red LED is on).

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

----------------------------- Uploading SREC to ZigBit module -----------------------------

I'm having a lot of trouble loading the srec file to the ZigBit module.

I use:
- ZigBit 2.4 GHz Amp module
- MAX 232
- bootloader hex and bootloader application from BitCloud 1.6
- USB to serial convertor (FTDI chip)
- windows 7
- latest jre

The usual flow I use for loading the srec file:
- keep the device in reset
- select COM port, file and hit the Upload button
- the message "Please reset device" appears
- after a few seconds I release the reset
A lot of times it says Upload started, nothing happens and then the pop out window with Failure appears.
And sometimes just works one after another write without any problem.
Is there something wrong in the flow?

-------------- Command line option for setting MAC, channel mask and PAN --------------

In a Meshnetics document I noticed another bootloader ( for BitCloud 1.2, written in C# maybe - given the icon) in which the MAC, channel mask and PAN could "written" when firmware is updated.
In the new bootloader MAC, channel mask and PAN id can NOT be set.
What would be a "pratical" solution for writing these values to a batch of devices? (most important the MAC)
I was thinking of the flow:
- write firmware
- start device and let it connect to COO
- send from COO a message which instructs the device to write a given MAC, channel id (as payload of the message)
- flush CS data to eeprom
This will work but it would be nicer to have the command line option.

----------------------------- Bootloader communication protocol -----------------------------

We are now getting closer to deploying ZigBit based devices. I would like to set up another embedded device for updating the firmware in the field.
The only specification I manage to find for the bootloader is the one from BitCloud 1.2: P-ZBN-Serial_Bootloader_Users_Guide.pdf

Is it still the same protocol for communicating with the bootloader?

----------------------------- Fuse access -----------------------------

Can the fuses be burned using the bootloader?
I would like to block JTAG access to all devices. Flash access will be allow for further updates.

Thanks

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

EGTOGAMAT wrote:
- windows 7
Is there something wrong in the flow?

From all of above only win7 was not tested. I'm not blaming it but this may be something to think on.

EGTOGAMAT wrote:
In a Meshnetics document I noticed another bootloader

Can you give a link to this document? I'm not sure I've been at Meshetics that time :)

EGTOGAMAT wrote:

What would be a "pratical" solution for writing these values to a batch of devices? (most important the MAC)

It is a common request and I hope something will be done soon. Now I see two ways:
1. To parameters you need set some distinctive values (0x1234, 0xaabb etc) and find they offsets in final file. Messy way but may work especially if you do not plan to change production firmware too often.
2. Make that blank device (right after programming) will accept only configuration parameters via UART or some other interface and if configured already will just start to work.

The problem here with software update since after update all parameters will be lost. Good way to go would be external EEPROM with parameters stored.

EGTOGAMAT wrote:
Is it still the same protocol for communicating with the bootloader?

I believe it should be. Protocol has not been changed for a long time (if was changed at all).

EGTOGAMAT wrote:

Can the fuses be burned using the bootloader?

No. And I also not sure if fuses can be changed from device at all.

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

code-by wrote:
In Lowpower sample (stack 1.6) I try to add another int to message structure:

I'll check this tomorrow.

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:
EGTOGAMAT wrote:
- windows 7
Is there something wrong in the flow?

From all of above only win7 was not tested. I'm not blaming it but this may be something to think on.

Same problem on Windows XP
I notice that while in reset device sends continuously 0x0. Is this what it should do? Or my hardware configuration might cause this?

alexru wrote:

Can you give a link to this document? I'm not sure I've been at Meshetics that time :)

http://www.meshnetics.com/netcat...(Serial%20Bootloader%20Users%20Guide).pdf

alexru wrote:

It is a common request and I hope something will be done soon.

I hope too as I consider this a major feature.

alexru wrote:

Good way to go would be external EEPROM with parameters stored.

For large projects this is the way we will do it.

alexru wrote:

I believe it should be. Protocol has not been changed for a long time (if was changed at all).

I will give it a try and let you know.

alexru wrote:

And I also not sure if fuses can be changed from device at all.

Not even when loading bootloader hex to device (using PonyProg - I do not have a JTAG)?
I will try to burn the JTAG fuses (so that device will not accept JTAG).

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

EGTOGAMAT wrote:
I notice that while in reset device sends continuously 0x0. Is this what it should do?

No. At reset device should not (and can't actually) send anything. Bootloader also never sends anything without request.
Some interference may cause this. Watch signal at TX pin with oscilloscope to see if signal stable in reset.

The dialog says that parameters are applicable only for eZeeNet (that is first version of ZigBee stack made by MeshNetics, not supported anymore).

EGTOGAMAT wrote:
I hope too as I consider this a major feature.

Request to avr@atmel.com might help a little :)

EGTOGAMAT wrote:
(using PonyProg - I do not have a JTAG)?

PonyProg can program fuses.

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

I have 3 questions regarding the EEPROM access methods (using PDF methods):

1. From what offset should I start writing? (0 I presume)

2. What does the callback function expect from the user? Only when callback is called are the parameters done reading/writting?

3. Can I write for multiple times to same location?

Thanks

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

EGTOGAMAT wrote:
1. From what offset should I start writing? (0 I presume)

That is correct. PDS will calculate actual offset by itself.

EGTOGAMAT wrote:
2. What does the callback function expect from the user? Only when callback is called are the parameters done reading/writting?

After callback is called all data is stored in EEPROM and supplied buffer is free.
You can pass NULL as callback and PDS_*() will be synchronous.

EGTOGAMAT wrote:

3. Can I write for multiple times to same location?

Yes, after callback is called or PDS_WriteData() with NULL callback finished.

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

I don't know what it was (bug ?) but after changing int16_t to int8_t it begin to work and work now with int16_t :)

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

code-by wrote:
I don't know what it was (bug ?) but after changing int16_t to int8_t it begin to work and work now with int16_t :)

Possible failure during upload.

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 the purpose of fob?

It will be like a car key fob.

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

lucicop wrote:
It will be like a car key fob.

Don't you think that ZigBee is huge overkill in this application?

You may try to join network when button pressed and leave network when car opened but much simpler solution will be to use radio directly and transmit raw packets without any wireless stack.

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:
code-by wrote:
I don't know what it was (bug ?) but after changing int16_t to int8_t it begin to work and work now with int16_t :)

Possible failure during upload.

I try 5-6 times with some modification of program and it not working, so it coundn't be 5-6 failures uploads...

Pages