Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
將燒錄器的範圍改成手動就可以讀取程式碼了,預設是無法讀取??
發表於: 2022/10/19 20:59
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
順便問一下為什麼IPE 讀取 ATSAM的IC一定要掛入HEX才能讀取,掛入HEX檔再移除HEX檔也還是可以讀取,讀IPE剛打開選完IC和燒錄器沒掛HEX檔就是無法讀取程式
PIC IC沒有這個問題
發表於: 2022/10/19 16:36
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
不知道什麼原因我的X IDE 5.50都沒辨法讀取程式 在Execution Memory都看不到什麼變化,一直都是0xFFFF
改用IPE 5.50就可以讀取程式了
發表於: 2022/10/19 16:20
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
相同的IC 建立新專案 位址應該是一樣的吧?!
一定要用那個專案來開hammony建立才行嗎? 將這段程式碼貼到相同IC的專案之中, initialization.c 下 斷電重開...還是可以將程式讀出來.... #ifndef __DEBUG const unsigned int __attribute__((space(prog), keep, address(0x41004000))) SET_SECURITY_BIT = 1; #endif
發表於: 2022/10/14 12:31
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
管理員
|
必須要用Harmony Gen出來的Security Bit設定才能使用, 不可使用別顆的程式貼上, 因為Security Bit地址可能不同.
在燒錄時, MPLAB XIDE 專案中的燒錄器設定, 預設會清除Flash才進行燒錄, 此時會自動解除 Security Bit 但是在燒錄後即會重新設定 Security Bit, 當你剛燒完立刻選擇讀取Flash時, MPLAB X IDE中的Program Memory會是上次燒錄時的內容, 可以關掉MPLAB X IDE重新進入來確定是否是新讀出來的內容,
發表於: 2022/10/7 17:42
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
設定如下圖 是不是有什麼設定錯誤的呢??
發表於: 2022/9/27 20:59
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
我試著建立一個新的專案(空的) 設定保護Bit
燒錄後程式還是可以讀回來
發表於: 2022/9/27 20:57
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
我找到一段說明 他的設定方式又不太一樣 他的說明我看了不是很理解
https://microchipsupport.force.com/s/a ... /SAM-D-L-C---Security-bit Question How to set and check the security bit in software (without power on reset) ? or The SSB command is used to set the Security bit. However, the Security Bit does not seem to be set until a power cycle is done. Is there a way to get the Security bit to be effective immediately without power on reset? Answer The security bit is read by the hardware only after a reset. For setting the security bit through software, first set the fuse bit using SSB command, then do a software reset using NVIC_SystemReset() API, which resets the MCU. The below code will set security bit and give software reset. After the device resets, it turns on the PB30 pin.
發表於: 2022/9/27 14:34
|
|||
|
Re: ATSAMHA1E16AB 這顆IC如何設定程式保護?
|
||||
---|---|---|---|---|
資深會員
|
參照:
因為我目前的專案無法開啟Harmony ,所以我新開了一個專案進入Harmony 把那段程式碼放到了我的專案下再進行編輯...但程式還是可以讀回來...是那裡少做了嗎??? #ifndef __DEBUG const unsigned int __attribute__((space(prog), keep, address(0x41004000))) SET_SECURITY_BIT = 1; #endif
發表於: 2022/9/27 11:00
|
|||
|