analogdevicesinc / precision-converters-firmware

Precision Converters Embedded Firmware Repository
https://analogdevicesinc.github.io/precision-converters-firmware/
Apache License 2.0
16 stars 18 forks source link

Projects: ad2s1210: Add support for ad2s1210 #24

Closed ahaslam2 closed 11 months ago

ahaslam2 commented 1 year ago

The AD2S1210 is a complete 10-bit to 16-bit resolution tracking resolver-to-digital converter

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.

mphalke commented 1 year ago

@ahaslam2 Please sign the CLA before we start reviewing this PR

jansunil commented 1 year ago

General question - EEPROM implementation is not seen. Are there plans to add it in the future?

jansunil commented 1 year ago

General comment - .gitignore file needs to be added within the projects/ad2s1210_iio directory Example- https://github.com/analogdevicesinc/precision-converters-firmware/blob/main/projects/ad4696_iio/.gitignore

ahaslam2 commented 1 year ago

Change log of last push:

Fix comments from @jansunil:

ahaslam2 commented 1 year ago

Change log of last push:

ahaslam2 commented 1 year ago

Changes on last push

ahaslam2 commented 1 year ago

Change log from last push

@jansunil i think i addressed all the comments, https://github.com/analogdevicesinc/no-OS/pull/1953 was merged. if there are no more comments would it be ok to merge this PR now?

jansunil commented 1 year ago

The changes look good to me. @mphalke @ribdp - Do you have any comments on these commits?

jansunil commented 1 year ago

@ahaslam2 - Looks like some APIs are dependent on the latest no-OS driver commits from github.com/analogdevicesinc/no-OS/pull/1953

Should we also update the commit hash here?

mphalke commented 1 year ago

Change log from last push

  • document fly wire setup in readme.
  • added function doc for attr_set, attr_get and trigger_handler
  • removed unneeded trigger_gpio_param
  • reorder DATA_CAPTURE_MODE defines like other projects (ignore warnings)

@jansunil i think i addressed all the comments, analogdevicesinc/no-OS#1953 was merged. if there are no more comments would it be ok to merge this PR now?

I don't think all comments are addressed properly to merge this PR. Please check again and fix all

ahaslam2 commented 1 year ago

@ahaslam2 - Looks like some APIs are dependent on the latest no-OS driver commits from github.com/analogdevicesinc/no-OS/pull/1953

Should we also update the commit hash here?

@jansunil sorry not sure what i should update. you mean i should update the commit hash of libraries/no-OS with the latest commit hash of no-os?

ahaslam2 commented 1 year ago

change log:

jansunil commented 1 year ago

@ahaslam2 - Looks like some APIs are dependent on the latest no-OS driver commits from github.com/analogdevicesinc/no-OS/pull/1953 Should we also update the commit hash here?

@jansunil sorry not sure what i should update. you mean i should update the commit hash of libraries/no-OS with the latest commit hash of no-os?

@ahaslam2 So the latest commit that has been made to the ad2s1210 no-OS drivers is here so the no-OS.lib file and its respective sub-module needs to be referenced "2627ec0bfe7f79ef3b0027b6a96ea2a4a7aa6d8c" as its commit ID so that the changes made as a part of this commit are also included when someone uses the FW.

A straightforward copy-paste of this ID would be enough for updating the no-OS.lib Please check here for some inputs on how to update the sub-modules.

ahaslam2 commented 1 year ago

Changelog:

ahaslam2 commented 1 year ago

@jansunil is it ok now ? Not sure what the CI build errors are about, they seem not related to this patch. I tested

mbed-compile was OK.

ahaslam2 commented 1 year ago

@jansunil @mphalke i added a patch in this MR to update to the latest version of the libs:

https://github.com/analogdevicesinc/precision-converters-firmware/pull/24/commits/8d787723bfbfed2e1ee70b91da07602549b1da42

I compiled with mbed-cli all seems ok would it be possible you take another look at this and let me know if its ok to merge?

mphalke commented 12 months ago

@ahaslam2 I had given some comments last month but unfortunately those were not get reflected into the PR. Apologies. Please check them now and do the necessary updates to code.

mphalke commented 12 months ago

@ahaslam2 Some more questions:

  1. What's the plan on adding build and test support for this project? I think we should have them in place. Please refer any existing project and check how are adding build and test support (it's quite straightforward). We need to have ci_build.groovy file in the project directory and then pytest based tests folder.

  2. I didn't see anything done w.r.t. eeprom validation and context attribute read/validation in the FW. Have a look at this code here: https://github.com/analogdevicesinc/precision-converters-firmware/blob/main/projects/ad4130_iio/app/ad4130_iio.c#L1692. It is important to have bord info validated and conveyed to client tool so that evaluation software detects the valid board. Have a look at this file created by Phillip which contains the checklist for firmware release. https://github.com/analogdevicesinc/precision-converters-firmware/blob/main/CONTRIBUTING.md. If you want to do that as a part of new PR, please do so.

  3. There are few things which you may not be able to do such as updating ADI product pages, link wiki page to product page, etc. These things are part of release checklist (CONTRIBUTING.md). So I would suggest to prepare a list of items which are not done as per checklist and share with us, so that we know what is pending and if we can do from our side. I would be bit skeptical of the releasing project without this checklist.

  4. I assume STM32 work is also planned and that would be added as a part of new PR

I will get back to you if anything is pending once above things are addressed. Thanks.

ahaslam2 commented 12 months ago

Hi @mphalke,

Thanks for the feedback ill fix your comments.

about the questions:

  1. ill check about adding build test support.
  2. there is no eeprom validation because we use a breakout board to be able to plug in to the K1 this breakout board has its own eeprom on the same i2c buss. i was told that eeprom validation was not mandatory, but if really is, and the eeproms have different addresses i can check about adding this.
  3. ill prepare list of items which are not done with respect to the checklist.
  4. we will have to see about STM32 after we are done with this.
mphalke commented 12 months ago

@ahaslam2

  1. Thanks
  2. Understood. In that case we could just return the hardcoded hw_carrier and hw_mezzanine names from context attributes. FW version would be taken from our Jenkins build system. hw_carrier would be MCU board (e.g. SDP_K1), hw_mezzanine would be Eval board name that you are using.
  3. Thanks
  4. Having just Mbed support is fine now.
ahaslam2 commented 11 months ago

Change log:

Notes: No EEPROM detection as we use breakout board with different EEPROM that gets auto detected by PCF CI_groovy was not validated. only test python script was run for the angle channel . wiki pages not updated.

ahaslam2 commented 11 months ago

Changelog:

ahaslam2 commented 11 months ago

Change log:

ahaslam2 commented 11 months ago

Change log:

mphalke commented 11 months ago

looks good to me unless any comments from @jansunil and @ribdp

ahaslam2 commented 11 months ago

changelog: