Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
TARGET_STM: Add DEVICE_SPI_COUNT to use SPIs without interference #10841
kjbracey-arm left a comment
Content's fine, but I'm doubtful it counts as a "fix".
Possibly it could be "target update".
This will notably change behaviour and memory footprint of apps, so a bit wary about going to a patch release either way, but I wouldn't totally rule it out.
I guess it fixes #10827, sort of, but he could fix his issue without this by driving the API correctly, as I described there. This is more a workaround so it doesn't matter that he sets his GPIO before selecting the SPI.
@kjbracey-arm I'm a bit worried now :-/
Oh, certainly it should be deployed for all, but the act of deploying it for any particular target does impact application behaviour on that target beyond a simple fix. It's a functional improvement, with a corresponding memory increase to implement that improvement.
So it tends to fall closer to the "this should be deployed in the next minor release" than "this should be issued as a 5.13 patch".
But there is also the counter-argument that "the other targets work nicely like this, this one doesn't, so that inconsistency/deficiency is a bug in this target".
I've no strong feeling either way - I'm willing to leave the 5.13.y backport choice to other maintainers, and ST's own to decide. But this is good for master either way.
I phrased my comment above a bit badly. This patch isn't a workaround itself, but deploying it makes that reported issue go away - it's not the ultimate fix for his issue. The code in the issue is flawed, but works when his SPI devices aren't state sharing. This patch means that flaw stops being apparent, because we detect the separate buses and stop state sharing. His code would fail again if he put his devices on the same bus.
Actually there is a remaining glitch for #10827 even with this patch -
He needs to modify his code as I suggested there - either use