-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zolertia Z1 port for RIOT OS #893
Conversation
How can I test this? I tried with |
One can also execute the built ELF file with Cooja (after renaming 'xxx.elf' to 'xxx.z1'). But yes, there are still issues I need to address (especially with the radio transceiver). |
Indeed, |
It seems to be a problem related to the MCU frequency (the UART configuration supposes it runs at 8 MHz). After a bit of fiddling with DCO configuration, I'm now having some output from the mote. By the way, what's the |
Actually |
If better means higher hackability, yes ;-) |
Hmm, still don't get any output from the Z1 even with |
Looks like I will have to trace this thing at the cycle-level with JTAG. |
Any progress? |
Well, not yet. I have to hurry and prepare some submission (as part of my thesis job) on 802.15.4 radio MAC protocols for a conference whose submission deadline is only a few days away; so I have to concentrate on that part for now, instead of watching for UART-related problem (it's also the reason I submitted some fixes about CC2420 and HW timers lately). I don't give up on that point, rest assured it's only a matter of time before I delve into this. |
@OlegHahm Does this change makes things better? I can now see the correct output of the 'pingpong' example. |
// TACTL = 0; /* Stop Timer_A */ | ||
|
||
// BCSCTL1 &= ~(DIVA1 + DIVA0); /* remove divisor from ACLK again */ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The above 53 lines are not used at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are the code that configures the MSP430 clock module for the MCU frequency you choose. For now, since I'm trying to debug UART, I commented it and replaced it by direct affectation of clock HW registers...
I'll probably re-enable this portion of code when everything is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you intend to fix the UART and un-comment this before the PR gets merged? If not:
It would be a lot cleaner to split it to a different PR.
If yes:
Please mark the PR as WIP (via label and description).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's an ongoing WIP effort; I just marked it as you suggested.
Rebased on master (again). |
Still cannot see any output (neither with pyterm nor with minicom). What't the intended baudrate? |
@rousselk please look at the travis output, seems link the z1 needs some blacklisting for some boards, but every fail case needs it's attention, perhaps there is something other wrong with it :) |
I guess you meant "blacklisting for some applications". |
blacklisting the Z1 in applications.... |
So
should result in the expected output, right? I don't see anything after:
|
Indeed, it should work the way you build it... |
No difference. |
As comparison below the implementation of the OpenWSN project. |
@thomaseichinger Hello. Actually the computations made by my macros produce values 0x45 for Well, I'll try to disable the macros and directly put the numeric values in the registers, but according to the JTAG debugger, it won't really change anything... I must admit, I'm at a loss... The values I use for configuration are the same than in Contiki's Z1 port, the same that Zolertia recommend... and you have now learnt me than OpenWSN also use the same!... Just why doesn'it work now?... |
OK, fixed the Makefiles (and reorder again the blacklisted board alphabetically), made the DCO calibration optional with #ifdef, and squashed. After a last round of tests, I expect this one to be the one. |
👍 ACK |
I'll leave the gratification to press the merge button to you. |
* This file subject to the terms and conditions of the LGPLv2. See the file | ||
* LICENSE in the top level directory for more details. | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing doxygen header
Ok, works fine! ACK from me once you address the documentation and comment style issues |
Fixed doc/comments. |
Looking good, ACK (again) |
May I suggest you reword the second commit to |
OK. |
Oh, and one more thing:
|
OK (again). |
ACK ACK! |
..and thanks for bearing.. |
@LudwigOrtmann You're welcome; I saw you had some work on this item lately (for native if I remember correctly...) |
I automated it: #1181 |
@rousselk Hooray, Travis likes your PR =) |
@rousselk Do you want to merge it? |
Yay, @rousselk it's your honour to push the button. |
OK, time has come. |
Congratulations =) |
Thanks everyone, especially Thomas: I think I would still be wondering what's wrong with USB/UART if you didn't give me the finger. |
\o/ Congratulations! Happy I could help and looking forward to your next PR! |
First version of RIOT OS for Zolertia Z1 (platform described in RIOT's Wiki on GitHub).
What should work:
Todo (in a next version):