-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
CCM RAM more accessible #546
Comments
The macros that are used to set up tasks and queues with static memory could be modified to use the CCM RAM |
@krichardsson : I would really like to use CCMRAM in the system. Could you mention the updated macros to obtain this as mentioned in #546 (comment)? |
@imranmomtaz The macros I mentioned are defined in https://github.com/bitcraze/crazyflie-firmware/blob/2020.04/src/modules/interface/static_mem.h |
@krichardsson : Thanks for your reply. I see the file you mentioned and it looks like general purpose code. I was actually wondering if I could get the exact code which should be written for the CCMRAM. :) Thanks. |
The CCM RAM is a bit different from the normal RAM and has some special properties, it can not be used for DMA operations for instance. For this reason we must be a bit careful of what we use it for, but task stacks, queues and timers should be fine for instance. We could maybe also provide a mechanism (macro for instance) that allows a programmer to explicitly put static data in the CCM, when it is known that it will not cause any problems. Such mechanism should be explicit and make it clear that the variable has special properties. Some guidelines of how to move data to the CCM https://www.openstm32.org/Using%2BCCM%2BMemory |
@imranmomtaz Sorry, we don't have any code for this yet. |
"We could maybe also provide a mechanism (macro for instance) that allows a programmer to explicitly put static data in the CCM" This would be very desirable. Please consider to implement this. :) |
We have discussed this internally and have come to the following conclusion: The CCM is limited in that it is not possible to use it for DMA. This might not seem as a big problem, and it is not for the majority of the code, but some drivers do use DMA to retrieve data from a sensor for instance, and if such driver is given a pointer to CCM it will not work. For this reason we believe the best approach is to use the CCM as system memory as much as possible, freeing up normal RAM that can be used without any special precautions. The current approach is to
|
@krichardsson : Thanks for your last reply. Will your team be working on this implementation? Thanks. |
Currently we mostly advocate to use the 128 kb ram on the STM32f4, however, there are 64 kb CCM ram left that we can use for all kinds of other stuff like loading trajectories or implementing applications (incorperating the app layer or a neural network?). We should make it easier to use this memory.
The text was updated successfully, but these errors were encountered: