changeset 131:03f847019642 main

Change to a 10ms wait around reset, rather than 100ms. Ten is the value that is proven to work, and 100 is unnecessarily excessive.
author Bob Cook <bob@bobcookdev.com>
date Mon, 26 Dec 2011 15:50:37 -0800
parents e65210fe1cb0
children 0ea0246d4a70
files main/packages/avr/can/mcp2515.cpp
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/main/packages/avr/can/mcp2515.cpp	Sat Dec 03 16:38:46 2011 -0800
+++ b/main/packages/avr/can/mcp2515.cpp	Mon Dec 26 15:50:37 2011 -0800
@@ -679,21 +679,22 @@
 #if defined( PRJ_MCP2515_USE_HW_RESET )
 
     PRJ_MCP2515_RESET_PORT &= ~( 1 << PRJ_MCP2515_RESET_PIN );
-    spinwait_delay_ms( 100 );
+    spinwait_delay_ms( 10 );
     PRJ_MCP2515_RESET_PORT |= ( 1 << PRJ_MCP2515_RESET_PIN );
-    spinwait_delay_ms( 100 );
+    spinwait_delay_ms( 10 );
 
 #else
 
     //--    Wait for the hardware to stabilize; this isn't required on resets other than
     //      the first, but it doesn't hurt.
 
-    spinwait_delay_ms( 100 );
+    spinwait_delay_ms( 10 );
 
     device_select();
     spi_write( MCP_COMMAND_RESET );
     device_unselect();
-    spinwait_delay_ms( 100 );    // approximately long enough
+
+    spinwait_delay_ms( 10 );    // approximately long enough
 
 #endif