-
Notifications
You must be signed in to change notification settings - Fork 3k
Adding MAXWSNENV platform. #1003
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
Conversation
self.extra_labels = ['Maxim', 'MAX32610'] | ||
self.macros = ['__SYSTEM_HFX=24000000'] | ||
self.supported_toolchains = ["GCC_ARM", "IAR", "ARM"] | ||
self.default_toolchain = "GCC_ARM" |
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.
currently default can be ARM or uARM (for online IDE)
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.
What is the difference between ARM and uARM? I'm not sure which we should use.
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.
Here's the link for explanation : http://www.keil.com/support/man/docs/armlib/armlib_chr1358938938431.htm
@jeremybrodt Can you provide some details for deep-sleep function? There's rtc used as time keeper. How many bits does the counter has for your platform ? How does this can be implemented for other platforms with rtc only 24 bit ? Or, Nordic rtc cant be set, the counter is read only for instance. What options did u consider for deepsleep function? Firing all scheduled events before going to deepsleep? |
On our platform, the timer used for the us_ticker is not clocked in deepsleep. We must use the RTC to generate a time based wakeup. Our RTC is 32-bits. Why would this need to be implemented on other platforms? From what I have seen, it appears the us_ticker continues to operate on other platforms. I simply added this functionality so the us_ticker wouldn't break when going into deepsleep. If you added another, low-power ticker, then we would change this implementation appropriately. The us_ticker time would still need to be updated after wakeup based on the elapsed RTC time, since it is not clocked in deepsleep. |
For other platforms us_ticker stops operating in deepsleep. Well on the NRF one it should continue, but every other one has no active ticker in deepsleep. I like your solution, but it is different behavior than others, so probably something which needs to be considered :). Especially added with what that new mythical low-power API is going to bring. |
So do I need to remove the RTC code from deepsleep and just let the us_ticker die? This will make our BLE applications more complicated since we will have to manage this at a higher level. |
@jeremybrodt Can keep it for now, but we should look at this more closer to unify it. I will review the other changes. |
This can be merged. There are some conflicts, can you resolve them ? I got one more comment, to xxxAliases which are defines, if they can be defined as enums. This can be done via a new PR. |
Ok. I will rebase to the latest head. Are you refering to PinAliases.h and PeripheralAliases.h? If so, the underlying symbols are already enums defined in PinNames.h and PeripheralNames.h. |
I can't locate any other LED1 or LED_GREEN, only these
|
They are just above in the same file. |
Why do you prefer defines over enums? Can you make all those part of PinNames? |
We are planning to make multiple boards using the same microcontroller. I am trying to abstract micro-specific definitions from board-specific definitions. The enums in PinNames.h define the actual pins of the micro. The macros in PinAliases.h define what board features the pins are connected to. Depending on the board, they may be connected to different things. On this board (MAXWSNENV), the green LED is connected to P1.7. On a different board, it may be a different pin. We are using macros because we do not want to create a new type. These symbols will be passed as parameters to the various API functions. They need to be of type "PinName." |
What is the advantage of making the aliases enums of type PinName as opposed to macros? |
Thanks for rebasing. To have them as symbols, for example available when debugging. And users look at PinNames to find what valid PinNames an application can use. A comment would be helpful there in the above PinNames, that additional pins are in those aliases header files, just my 5 cents. I don't know if all aliases are valid for all platforms which will come, if this could be valid. Add all common symbols as LED, SW, USBTX in PinNames, redefine the values using preprocessor. An example -
I'll merge this as it is. |
Adding support for the Maxim Integrated MAXWSNENV platform.