-
Notifications
You must be signed in to change notification settings - Fork 3k
[B96B_F446VE] New platform + development of dma_asynch_serial + hwControlFlow #1470
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
Conversation
…_F4_asynch_serial
…to dev_F4_asynch_serial
…_F4_asynch_serial
Need to change the SerialBase.cpp api, in order to provide the callback address to the DMA interrupt. Simple test works with USBTX and USBRX pins. To be further tested
…to dev_F4_asynch_serial
…_F4_asynch_serial
Different handler for dma rx interrupt, compatible with mbed api
|
MBED_16 is failing due to a modification done recently in mbed micromaster (to be investigated and fixed separately) |
Please find hereafter the main I used to validate the serial #include "mbed.h" #define TEST_HWFLOWCONTROL 1 /------------------ Variables -------------------/ /**
/**
/-------------------- Main ----------------------/
#if TEST_HWFLOWCONTROL #ifdef TRANSMITTER_BOARD
#endif
} |
obj->databits = UART_WORDLENGTH_8B; | ||
obj->stopbits = UART_STOPBITS_1; | ||
obj->parity = UART_PARITY_NONE; | ||
_SERIAL_OBJ(baudrate) = 9600; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not start a macro with underscore followed by an uppercase letter (it's reserved in any scope , see standard C/C++).
This macro is needed now as not all F4 are up to date to enable this feature ? Because this should not be needed if serial object is same for all F4 , it should be the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'll rename the macro and check your other comments below.
You're right, this is needed as long as this feature is not deployed on every F4.
Cheers
There're unit test for asynch, please have a look at : https://github.com/mbedmicro/mbed/tree/master/libraries/tests/utest . I would like to see result from serial one. If you can align the coding style to the one which is already in the file (should follow https://developer.mbed.org/teams/SDK-Development/wiki/mbed-sdk-coding-style) |
uint8_t serial_tx_active(serial_t *obj) | ||
{ | ||
MBED_ASSERT(obj); | ||
MBED_ASSERT(HAL_UART_STATE_BUSY_TX==0x12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this assert for? Same is for BUSY_RX == 0x22 ?
This would be easier to integrate if we could split this PR to smaller pieces:
Shall we do that? Sorry for taking longer to review this, but it is quite large changeset which came in before holidays :-) |
Hello, is it possible to handle several PRs at several gates of development in the same branch ? How is your suggestion of several PRs usually handled ? |
@adustm You can do cherry pick to get only those commits adding the platform.. I'll give it a shot. It was just a suggestion for this integration to be smoother/faster. Can you run those unit tests for this platform for serial? I shared above the links : #1470 (comment) |
The target was added, please send PR with adding other 2 features. I'll close this one. |
B96B F446VE is a new STM32 platform.
Asynch serial has been implemented using mbed interface (using DEVICE_SERIAL_ASYNCH).
A new define was added : DEVICE_SERIAL_ASYNCH_DMA 1 to force the use of DMA transfer for the async serial. define it to 0 if you want to use interrupts only instead of DMA.
Serial asynch can be extended to every STM32F4 family.
Serial HW Control Flow is supported for this platform (using DEVICE_SERIAL_FC define)