Skip to content
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

User trim values for NCS36510 #3159

Merged
merged 3 commits into from
Nov 10, 2016
Merged

Conversation

radhika-raghavendran
Copy link
Contributor

Adding user trim programming for NCS36510. Attached is the test result.
GCC_ARM_TestResults-28-10-2016.txt

Astyle and pylint run on code.
@@ -0,0 +1,8 @@
{
"mac-addr-low": "0x12345678",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this should be part of the targets.json and add this config there or placed here as it is

cc @sg- @bogdanm @c1728p9

@sg-
Copy link
Contributor

sg- commented Nov 1, 2016

@radhika-raghavendran
Copy link
Contributor Author

@sg- Would it be better to retain ncs36510_user_trim.json as is and placed in the same folder as targets.json?
Can you give some information about how "config" parameter is used in targets.json file? Looks like we can fit in the user trim values using the config parameter. We need to modify our post build script in order to make this change. The FIB as well as the user trim values are a part of the generated binary which is programmed on NCS3510 board. Any suggestions?

@sg-
Copy link
Contributor

sg- commented Nov 2, 2016

The config can be placed in targets.json just like https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L1839 This will reduce hidden config files

@radhika-raghavendran
Copy link
Contributor Author

I had a look at https://github.com/ARMmbed/mbed-os/blob/master/targets/targets.json#L1839.
Can I use the value in the tag "hf_clock_src" in the above example in a python script file?
I am still unclear about how this config can be used while generating binary. Can you give me any existing example?

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 3, 2016

Can I use the value in the tag "hf_clock_src" in the above example in a python script file?

Yes, look at Config class, that would return what you need (provides API to get targets data). should be get_target_config_data()

@radhika-raghavendran
Copy link
Contributor Author

radhika-raghavendran commented Nov 7, 2016

@0xc0170 Using this API does not give me the value of the tag.
There is no API to get the 'value' of the tag parameter directly. By using this API I get values like this:

Data params {'target.mac-addr-high': tools.config.ConfigParameter object at 0x000000000369C4A8, 'target.txtune-trim': <tools.config.ConfigParameter object at 0x000000000369C748, 'target.32MHz-clk-trim': <tools.config.ConfigParameter object at 0x000000000369C5F8, 'target.mac-addr-low': <tools.config.ConfigParameter object at 0x000000000369C438, 'target.32KHz-clk-trim': <tools.config.ConfigParameter object at 0x000000000369C550, 'target.rssi-trim': <tools.config.ConfigParameter object at 0x000000000369C6A0}

Here is the config params:
"config": {
"mac-addr-low": {
"help": "Lower 32 bits of the MAC extended address",
"value": "0x12345678"
},
"mac-addr-high": {
"help": "Higher 32 bits of the MAC extended address",
"value": "0xACDE4800"
},
"32KHz-clk-trim": {
"help": "32KHz clock trim",
"value": "0x3A"
},
"32MHz-clk-trim": {
"help": "32MHz clock trim",
"value": "0x16"
},
"rssi-trim": {
"help": "RSSI trim",
"value": "0x3D"
},
"txtune-trim": {
"help": "TX tune trim",
"value": "0x12"
}

Any sample usage will be very helpful. Thanks

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 7, 2016

@bogdanm Could you please look at the comment above?

@bogdanm
Copy link
Contributor

bogdanm commented Nov 7, 2016

@radhika-raghavendran, once you have a ConfigParameter instance, you cat access its value field to get the value of the config parameter. In the future, we'll probably want to add a get_value method to ConfigParameter. Cc @theotherjimmy

@radhika-raghavendran
Copy link
Contributor Author

@0xc0170 I have made the necessary changes to remove usage of a separate json file in targets and added configuration data for NCS36510 in targets.json file. You can review and let me know if there is a better way to implement the same. A get_value method with the name of the tag for ConfigParameter class would be very useful.

@maclobdell
Copy link
Contributor

maclobdell commented Nov 8, 2016

Hi @radhika-raghavendran,
Per our discussion on the phone I think setting the default MAC address to 0xFFFF... and adding description in the help that if all FFs then the value is ignored and factory-trim MAC value is used. That way users can take advantage of the factory MAC by default, and change it later if they want to.

Thanks!

@radhika-raghavendran
Copy link
Contributor Author

@maclobdell : Modifications made for MAC address and other trim default values. Comments added in json file. Thanks

@radhika-raghavendran
Copy link
Contributor Author

Attached are the latest test results.
GCC_ARM_TestResults-09-11-2016.txt

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 9, 2016

/morph test

@mbed-bot
Copy link

mbed-bot commented Nov 9, 2016

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1031

All builds and test passed!

aisair pushed a commit to aisair/mbed that referenced this pull request Apr 30, 2024
Ports for Upcoming Targets


Fixes and Changes

3127: Fixed the issue about push/pop of VFP register. ARMmbed/mbed-os#3127
3176: Modifying micro:bit pin names to mirror micro:bit edge connector ARMmbed/mbed-os#3176
3160: Fix wrong index at LPC43xx tx end ring assignment ARMmbed/mbed-os#3160
3217: Add I2C_ASYNCH capability for DISCO_F469NI ARMmbed/mbed-os#3217
3211: [NUC472/M453] Support single UART shared by multiple serial objects and other updates ARMmbed/mbed-os#3211
3198: NUCLEO_F410RB: Add I2C_ASYNCH capability ARMmbed/mbed-os#3198
3194: Update K64 sdk drivers ARMmbed/mbed-os#3194
3159: User trim values for NCS36510 ARMmbed/mbed-os#3159
3243: Fix make exporters compilation ARMmbed/mbed-os#3243
3231: STM32F3: DISCO_F303VC - Add missing UART and ADC pin muxing options ARMmbed/mbed-os#3231
3233: K20xx Calculate PWM clock relative to bus clock ARMmbed/mbed-os#3233
3237: Added back USART 6 pins ARMmbed/mbed-os#3237
3253: Fix default polarity on LPC43XX PWM driver ARMmbed/mbed-os#3253
3238: Dev i2c stm32f4hal ARMmbed/mbed-os#3238
3251: Dev stm32l0 cube v1.7.0 ARMmbed/mbed-os#3251
3252: [NORDIC - NRF51 - MBED 2] Fix non handled RTC IRQ ARMmbed/mbed-os#3252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants