Skip to content

[NRF52840]: enabled SdBlockDevice capability #4088

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

Merged

Conversation

nvlsianpu
Copy link
Contributor

Description

Fix capability by using SPI instead of SPIM peripheral and resign from SPI_ASNCHRONUS capability.
SPIM peripheral has the bug which imposed on one-byte transfer.

tests-api-spi is also fixed by this PR.

Status

READY

##Test result:

                                                           
{{__timeout;40}}
                                                              
{{__host_test_name;default_auto}}
                                             
>>> Running 6 test cases...
                                                    
{{__testcase_name;SPI - Object Definable}}
                                    
{{__testcase_name;SPI - SD card exists}}
                                      
{{__testcase_name;SPI - SD Write}}
                                            
{{__testcase_name;SPI - SD Read}}
                                             
{{__testcase_name;SPI - SD 2nd Write}}
                                        
{{__testcase_name;SPI - SD 2nd Read}}
                                         

                                                                               
>>> Running case #1: 'SPI - Object Definable'...
                               
{{__testcase_start;SPI - Object Definable}}
                                   
{{__testcase_finish;SPI - Object Definable;1;0}}
                              
>>> 'SPI - Object Definable': 1 passed, 0 failed
                               

                                                                               
>>> Running case #2: 'SPI - SD card exists'...
                                 
{{__testcase_start;SPI - SD card exists}}
                                     
{{__testcase_finish;SPI - SD card exists;1;0}}
                                
>>> 'SPI - SD card exists': 1 passed, 0 failed
                                 

                                                                               
>>> Running case #3: 'SPI - SD Write'...
                                       
{{__testcase_start;SPI - SD Write}}
                                           
{{__testcase_finish;SPI - SD Write;1;0}}
                                      
>>> 'SPI - SD Write': 1 passed, 0 failed
                                       

                                                                               
>>> Running case #4: 'SPI - SD Read'...
                                        
{{__testcase_start;SPI - SD Read}}
                                            
{{__testcase_finish;SPI - SD Read;1;0}}
                                       
>>> 'SPI - SD Read': 1 passed, 0 failed
                                        

                                                                               
>>> Running case #5: 'SPI - SD 2nd Write'...
                                   
{{__testcase_start;SPI - SD 2nd Write}}
                                       
{{__testcase_finish;SPI - SD 2nd Write;1;0}}
                                  
>>> 'SPI - SD 2nd Write': 1 passed, 0 failed
                                   

                                                                               
>>> Running case #6: 'SPI - SD 2nd Read'...
                                    
{{__testcase_start;SPI - SD 2nd Read}}
                                        
{{__testcase_finish;SPI - SD 2nd Read;1;0}}
                                   
>>> 'SPI - SD 2nd Read': 1 passed, 0 failed
                                    

                                                                               
>>> Test cases: 6 passed, 0 failed
                                             
{{__testcase_summary;6;0}}
                                                    
{{max_heap_usage;0}}
                                                          
{{end;success}}
                                                               
{{__exit;0}}
   

@@ -1566,7 +1566,7 @@
// <e> RTC_ENABLED - nrf_drv_rtc - RTC peripheral driver
//==========================================================
#ifndef RTC_ENABLED
#define RTC_ENABLED 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this RTC disabling related?

@@ -2696,7 +2696,7 @@
"supported_form_factors": ["ARDUINO"],
"inherits": ["MCU_NRF52840"],
"macros_add": ["BOARD_PCA10056", "CONFIG_GPIO_AS_PINRESET", "SWI_DISABLE0", "NRF52_ERRATA_20"],
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean spi async wont work for this target or needs further development?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have hardware bug - not so easy to be mitigated (if possible at all). HW Bug will be fixed in silicon for nRF52840 - as it is still preview mcu revision. After fix will coming it will be very easy to just turn SPI_ASYNCH back by reverting this changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation

@nvlsianpu nvlsianpu force-pushed the mbed-os-workshop-17q2-spi_sdcard branch from 1568516 to 7e8cfa8 Compare March 31, 2017 10:28
@bridadan
Copy link
Contributor

bridadan commented Apr 4, 2017

/morph test

@mbed-bot
Copy link

mbed-bot commented Apr 5, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1831

All builds and test passed!

@sg- sg- merged commit 62ff0d0 into ARMmbed:mbed-os-workshop-17q2 Apr 10, 2017
kegilbert added a commit to kegilbert/mbed-os that referenced this pull request Jun 7, 2017
…cating that change to allow builds on the NRF52840_DK (see original PR ARMmbed#4088 to see the explanation for the removal of spi async)
kegilbert added a commit to kegilbert/mbed-os that referenced this pull request Jun 8, 2017
…cating that change to allow builds on the NRF52840_DK (see original PR ARMmbed#4088 to see the explanation for the removal of spi async)
adbridge pushed a commit that referenced this pull request Jun 11, 2017
…cating that change to allow builds on the NRF52840_DK (see original PR #4088 to see the explanation for the removal of spi async)
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.

5 participants