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

Fix issues with new async SPI changes that broke compiling for B_U585I_IOT2A #204

Merged
merged 3 commits into from
Jan 11, 2024

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Jan 7, 2024

Summary of changes

In #199, I made a breaking change to the async SPI interface to require use of cache-aligned buffers. These are required for correct functionality when DMA SPI is being used, but unfortunately required heavy, breaking changes to the SPI API.

Turns out that when I did that, I broke stuff badly for B_U585I_IOT2A and its EMW3080B wifi module. Had to make two fixes:

  • Some typos in SPI.h were causing the SPI::transfer(nullptr, 0, rx_buffer, len) overload to not work correctly. I fixed those and now it works as intended -- turns out you are supposed to accept std::nullptr_t and not std::nullptr_t *
  • The EMW3080B driver has extensive infrastructure built on top of Mbed SPI, including its own network memory manager. I had to rewrite this part of the driver to use DynamicCacheAlignedBuffer objects to allocate the buffers instead of just creating them with malloc.

Impact of changes

B_U585I_IOT2A compiles again after #199!

Migration actions required

Documentation

None

Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

This was tested by @tim35ca on the forums


Reviewers


@multiplemonomials multiplemonomials merged commit 8e38d02 into master Jan 11, 2024
9 checks passed
@multiplemonomials multiplemonomials deleted the bugfix/fix-B_U585I_IOT2A-compile-failure branch January 11, 2024 20:23
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.

2 participants