Does anybody programming in OpenAt OS? [OS for Wavecom (Sierra Wireless) microprocesors]
I need help…:
I want to use TCU Service to make accurate timer (us - microseconds). I’ve tried example from documentation but it doesn’t work. In IRQ handler function I wrote adl_atResponse and TRACE functions but nothing isn’t displayed in terminal and also in traces view in Sierra Wireless Development Studio.
Maybe I am calling function with adl_irqSubscribe and adl_tcuSubcribe wrong. I simply called it in adl_main function. Is that ok?
EDIT:
I added stack definition for IRQ and with ms (miliseconds) it is probably working (maybe not correctly but I see traces), but mith another ADL_TCU_TIMER_UNIT (_S and _US) isn’t working.
Any suggests why?
Are you familiar with embedded programming - in particular, with programming interrupt handlers?
As a general rule, interrupt handlers - including IRQ handlers in Open-AT - need to be kept as short & simple as possible.
Therefore, you need to be very careful about use of things like adl_atResponse and TRACE…
(is adl_atResponse even allowed from an IRQ handler?)
Are you sure you have enabled the correct Trace levels?
Note that traces from IRQ handlers are on separate levels from the “main” ADL traces…
Have you looked at the supplied examples?
Have you spoken to your Distributor or FAE for support?
According to my first question…It was stupid but I copied all from other forum when I wrote firstly. So sorry…
Like I wrote when I added call stack declaration for IRQ I see traces. But only when I am using ADL_TCU_TIMER_UNIT_MS. For mikroseconds it doesn’t work and I don’t know why.
When I am using ADL_TCU_TIMER_UNIT_US
I am on student practice and programming WMP100 is my task. Enterprise gave me device and I have to programm it, so I can’t please distributor for any support because I don’t know him.
I you could, please help me. I’ll be very appreciate.
As far as I know, the minimum timing permissible is 1mS and the longest is 655mS. The TCU service used to be able to go down to 250us in Firmware version 7.1, however this was changed (not sure when). Here is a detailed description of why it was changed:
What you can do is read the hardware registry to find the actual limits. See the code below:
I need to connect iButton (DS1990A) and read its unique identifier. So I need to implement 1-wire communication.
Device that iButton will be cooperative is ready and its work is managed by WMP100 so I have to use WMP100.
Any ideas how to do my task?
Thanks for the your help
Edit: I’ve read a few of topics about 1-wire communication implemented by using Open At and something tell me that it isn’t possible :/. But no one has used WMP100, for example Q2686, but it works with the same ARM946. But I need to be sure. Please give me the simple answer YES/NO : Can I implement 1-wire using Open At and WMP100?
If NO could you told me exactly why? For example…because I can’t use any timers which can produce so fast ticks?
In my case time of setting direction IO isn’t important, because I will use one pin for input and one for output. iButton will not be connect directly to WMP100.
OK, I’ve checked what code provide by @tomridl results and as @tomridl said the minimum time duration for TCU service is 1 ms. Thank you very much @tomridl.
Ok, so I can’t use any timers, but maybe is other way? So the question is still actually.
OK, but what in case when I will use loops to generate right delays?
I know that this isn’t answer for this problem, but I can’t do it in other way (can’t use I2C ).
What is a probability that watchdog reset device when maximum delay function will be around 500 us? (I can’t find description of watchdog so I don’t know how it works, could you provide me some papers or short description?)
It will be short time loops so i think watchdog won’t run. So should look “for” loop which will delay around 1 us? I don’t know how to calculate it.
Ok, I can write delay function in asm and inject it in C code.
I am little importunate but I need concrete answers to convince my supervisor (I am on student practice now) that I can’t do it that way how he want. So please could you told me how long take setting pins?
I’ve told with my supervisor and explain him everything, but it goes me to bigger problem.
He’s contacted with other poeople doing smething with device that I am using and provide me couple of solutions, but the most important is:
Device has also PIC (PIC16F88) which is using to manage power supplying (that they said…). PIC is connected with WMP100. What I have to check is if it is possible to generate right time slots by PIC and next with using interuption setting right value on WMP100 I/O. So the case looks that:
PIC is connected with WMP100 by INT3 pin.
PIC generate time slots - PIC count to right value of us, next set INT3 pin what is recognized by WMP100, which set right value on I/O (in interuption function) which is connected with iButton.
My questions are: Could it will work? To work with interuption need I use which service from Open AT?
Very thanks for earlier responses and please for further help
I can’t use this PIC to do all 1-wire communication. I want to know if it is possible to do it by that I explained upper - by using PIC only for generate right time durations and generate interuption for WMP100?
iBuuton will be then connect to WMP100 I/O pins.
OK, so you are saying that seetings pin value by OpenAt (adl_ioWriteSingle) can take too much time, right?
Because I don’t understand what you mean by “timing”. Right points in time line when value of pin connected to iButton (1-wire bus) should change its state will be generated by interuption which will be sent from PIC. PIC count right time duration and next send signal to interrupt WMP100 normal work.
Interruption on WMP100 are operated immediately, when interruption signal occurs, aren’t they?
but I really can’t believe that so simple operation like setting pin can take time more than 5 us (I think with 1-wire communication 1-write time slot is the most demanding where master has to release bus in 15 us) on WMP100 which working with ARM9
Problem for me is in that my supervisor wants information like from documentation. Your words for me are enough, but won’t be for him
That’s why I am so importunate, sorry.