shilow Posted March 25, 2014 Report Share Posted March 25, 2014 Hi!I bought this displayhttp://www.banggood.com/2_2-Inch-Serial ... 12854.htmland was able to run it.To demonstrate the operation of the display I used the sample project for Chibios/RT and STM32VLDiscovery.Output to the screen only works in main() Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 26, 2014 Report Share Posted March 26, 2014 Thank you very much for sharing your work! It will be reviewed and eventually included into the repository.Why does the output only work in main()? Did you enable the MULTITHREAD macro?One more question: Why do you directly access the registers of the SPI peripheral? You shouldn't mix the ChibiOS/RT HAL with your own implementation as this can cause problems.~ Tectu Link to comment Share on other sites More sharing options...
inmarket Posted March 27, 2014 Report Share Posted March 27, 2014 Good and bad accessing the SPI registers directly.On one hand it is operating system independent (a good thing for uGFX), but on the other hand that then makes it CPU specific.So pluses and minuses. Link to comment Share on other sites More sharing options...
inmarket Posted March 27, 2014 Report Share Posted March 27, 2014 Thank-you for your contribution. I have added it into the repository under the boards/addons/gdisp directory. Link to comment Share on other sites More sharing options...
shilow Posted March 28, 2014 Author Report Share Posted March 28, 2014 Thank you very much for sharing your work! It will be reviewed and eventually included into the repository.Why does the output only work in main()? Did you enable the MULTITHREAD macro?my knowledge does not allow this to determine.possible problem in the stack size.One more question: Why do you directly access the registers of the SPI peripheral? You shouldn't mix the ChibiOS/RT HAL with your own implementation as this can cause problems.For proper output of commands/data on LSD, need hard synchronization of the CS, DC and outgoing data.DMA mode used ChibiOS does not allow it.Actually, I was able to do this using DMA, but the output baud LCD was very low. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted March 28, 2014 Report Share Posted March 28, 2014 Good and bad accessing the SPI registers directly.On one hand it is operating system independent (a good thing for uGFX), but on the other hand that then makes it CPU specific.I agree on your points but keep in mind that the driver does include ChibiOS/RT specific HAL functions such as palSetPadMode() in some other places. Whilst I fully agree to your points, I think keeping it consistent is more important.~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now