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

Spi slave enablement #128

Merged
merged 43 commits into from
Jun 21, 2024
Merged

Spi slave enablement #128

merged 43 commits into from
Jun 21, 2024

Conversation

NikhitaR-IFX
Copy link
Member

@NikhitaR-IFX NikhitaR-IFX commented Apr 12, 2024

By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---

CONTRIBUTING.md also tells you what to expect in the PR process.

Description:
SPISLave enabled with following functions:

  • Constructor

  • deinit()

  • write()

  • read()

  • write_readinto()

  • Hardware tests extended for SPI module

  • Documents corrected with latest changes

  • Pin connections for HIL test setup updated

  • SoftSPI feature discarded as it is not working as expected.

  • Removed old spi tests just calling the constructor.

Other not on ports/psoc6/spi code changes:

  • Updates in .github/workflows/ports_psoc6.yml to add i2c and spi tests.
  • Changes in automatic pin generation script to allow NC as pin as needed by CYHAL API.
  • Moved all tests requiring a "stub" to hw_ext/multi_stub.

@jaenrig-ifx @IFX-Anusha @ramya-subramanyam : This PR is now ready to review.

@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 3 times, most recently from 991f97d to 7efa045 Compare April 22, 2024 00:03
@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 5 times, most recently from 73bf02e to c4336ad Compare April 29, 2024 00:02
@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 3 times, most recently from 0e77323 to 185aa69 Compare May 5, 2024 00:02
@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 2 times, most recently from c063245 to 1c4b6c1 Compare May 9, 2024 15:00
@jaenrig-ifx jaenrig-ifx force-pushed the spi-slave-enablement branch 2 times, most recently from 4f1da80 to 3a70d83 Compare May 10, 2024 13:45
@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 4 times, most recently from 67f9037 to 8149c71 Compare May 17, 2024 00:02
@jaenrig-ifx jaenrig-ifx force-pushed the ports-psoc6-main branch 3 times, most recently from d822a4a to d5a9b1b Compare May 27, 2024 14:34
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: enriquezgarc <enriquezgarcia.external@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
./psoc6/run_psoc6_tests.sh -c --psoc6-hwext --dev0 ${devs0[0]}
./psoc6/run_psoc6_tests.sh -c --psoc6-hwext --dev0 ${devs0[0]}
echo " >> PSoC6 i2c tests"
if [ "${{ matrix.board }}" == "CY8CPROTO-062-4343W" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

By the way, this dirty selection approach (sorry for that 😞) should be tackle in the rework of this run_psoc6_tests.sh in future. I might have the chance to start as pre-1.0.0.

docs/psoc6/quickref.rst Outdated Show resolved Hide resolved
docs/psoc6/quickref.rst Outdated Show resolved Hide resolved
}

mp_obj_t machine_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
enum { ARG_id, ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits, ARG_firstbit, ARG_sck, ARG_mosi, ARG_miso };
mp_obj_t machine_spi_master_init_helper(machine_spi_obj_t *self, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
Copy link
Member

@jaenrig-ifx jaenrig-ifx Jun 20, 2024

Choose a reason for hiding this comment

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

Mmm, do we really need two machine_spi_xxxx_init_helpers()? We had one only before, no?
Can we just not have one? and if the user pass the ssel for master complain, and if he does not pass it for slave also complain?
Other than that parameter, the rest is the same or?

Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
Signed-off-by: NikhitaR-IFX <Nikhita.Rajasekhar@infineon.com>
@jaenrig-ifx
Copy link
Member

@ramya-subramanyam we are going to merge to bring latest HIL changes to main. You can review later.

@jaenrig-ifx jaenrig-ifx merged commit eac88ff into ports-psoc6-main Jun 21, 2024
30 checks passed
@jaenrig-ifx jaenrig-ifx deleted the spi-slave-enablement branch June 21, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants